Skip to content

Commit

Permalink
docs(readme)
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed Dec 29, 2015
1 parent 56d8eaa commit 0033e79
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### match-when - Pattern matching for modern JavaScript [![Circle CI](https://circleci.com/gh/FGRibreau/match-when/tree/master.svg?style=svg)](https://circleci.com/gh/FGRibreau/match-when/tree/master)

> Finally a **clear**, **succinct** and *safe* syntax for Pattern Matching in modern JavaScript.
> Finally a **clear**, **succinct** and *safe* syntax to do Pattern Matching in modern JavaScript.
#### Usage

Expand Down Expand Up @@ -37,6 +37,12 @@ Clear and simple right?

Note that `when()` is a catch-all pattern and should always be the last condition. If you forget it `match()` will throw a `MissingCatchAllPattern` exception.

##### Setup

```
npm i match-when -S
```

##### High Order Functions

`match` works well with high order functions like `map`, `filter` (and so on) too:
Expand Down Expand Up @@ -124,6 +130,7 @@ I will accept PR with their associated tests for the following features:


- support `range(x, y)`
- define and implement some syntax to support wildcards
- try and maybe support `match(input, {patterns...})` syntax instead of `match({patterns...})(input)`?

[todo-list inspired by pattern-match from dherman](https://github.com/dherman/pattern-match#patterns).
Expand Down

0 comments on commit 0033e79

Please sign in to comment.