# matchlib

> A simple pattern matching library

Latest version **1.1.3** (published 2021-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install matchlib
pnpm add matchlib
yarn add matchlib
bun add matchlib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2021-04-05 |
| First published | 2021-03-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Bahlul Hasanli |
| Maintainers | bahlulhasanli |

## Links

- npm: https://www.npmjs.com/package/matchlib
- Repository: https://github.com/BahlulHasanli/Match
- Homepage: https://github.com/BahlulHasanli/Match#readme
- Issues: https://github.com/BahlulHasanli/Match/issues
- npm.io page: https://npm.io/package/matchlib

## Recent versions

- 1.1.3 (latest) — 2021-04-05
- 1.1.2 — 2021-04-02
- 1.1.1 — 2021-03-31
- 1.1.0 — 2021-03-31
- 1.0.1 — 2021-03-31
- 1.0.0 — 2021-03-31

## README

# MatchLib

A simple pattern matching library

## Getting started

very simple to use:

`npm install matchlib`

after package installation

```javascript
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);
```

---
_Source: https://npm.io/package/matchlib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
