Skip to content

BahlulHasanli/MatchLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

MatchLib

A simple pattern matching library

Getting started

very simple to use:

npm install matchlib

after package installation

import matchlib from 'matchlib';

const option = matchlib(50)(
  [(key) => key === 18, () => `You are young`],
  [(key) => key === 50, () => `You are old`],
  [(key) => key === 6, () => `You are a child`]
)(() => `Not found!`);

console.log(option);

About

A simple pattern matching library

Resources

Stars

Watchers

Forks

Packages

No packages published