From cec2c0d178e395c56b86ae0ccb6f546cf418d2af Mon Sep 17 00:00:00 2001 From: FG Ribreau Date: Mon, 28 Dec 2015 23:48:28 +0100 Subject: [PATCH] docs(readme) --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe2e23e..56b3260 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,20 @@ function parseArgument(arg){ parseArgument(process.argv.slice(1)); // displayHelp || displayVersion || (binded)unknownArgument ``` -##### AND +### Supported patterns: +- `{ x1: pattern1, ..., xn: patternn }` - matches any object with property names `x1` to `xn` matching patterns `pattern1` to `patternn`, respectively. Only the own properties of the pattern are used. +- `[pattern0, ..., patternn]` - matches any object with property names 0 to n matching patterns `pattern0` to `patternn`, respectively. +- `when.or(pattern0, pattern1, ...)` - matches if one `pattern` matches. -#### Supported patterns: +### Todo: -- `{ x1: pattern1, ..., xn: pattern }` - matches any object with property names `x1` to `xn` matching patterns `pattern1` to `pattern`, respectively. Only the own properties of the pattern are used. -- `when.or()` +I will accept PR with their associated tests for the following features: + +- `match.and(pattern, ...)` - matches if every pattern matches. +- support `range(x, y)` + +[todo inspired by pattern-match](https://github.com/dherman/pattern-match#patterns). \* *well, of course, they are not keywords but simple functions*