# @jx/match

> Pattern matching

Latest version **0.0.4** (published 2017-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jx/match
pnpm add @jx/match
yarn add @jx/match
bun add @jx/match
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-07-21 |
| First published | 2017-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James "The Jamesernator" Browning |
| Maintainers | jx |

## Links

- npm: https://www.npmjs.com/package/@jx/match
- npm.io page: https://npm.io/package/@jx/match

## Dependencies (6)

- [babelify](https://npm.io/package/babelify.md) ^7.3.0
- [babel-core](https://npm.io/package/babel-core.md) ^6.25.0
- [folder-module](https://npm.io/package/folder-module.md) latest
- [babel-preset-latest](https://npm.io/package/babel-preset-latest.md) ^6.24.1
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1
- [babel-plugin-transform-runtime](https://npm.io/package/babel-plugin-transform-runtime.md) ^6.23.0

## Recent versions

- 0.0.4 (latest) — 2017-07-21
- 0.0.3 — 2017-07-21
- 0.0.2 — 2017-07-17
- 0.0.1 — 2017-07-17

## README

# Match

## Experiemental package designed for
## trying out semantics of [the pattern matching proposal](https://github.com/tc39/proposal-pattern-matching)

# Test a value matches a pattern

```js
import match, { string, number } from "@jx/match"

match([string, string, number], ['cats', 'hats', 2]) // true

match.on('fizz')
    .if(string, val => console.log("Got a string!")
    .else(_ => { throw new Error("Not a string") })
```

### Methods docs coming soon

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