FGRibreau / FGRibreau/match-when

Support pattern extraction and wildcard

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
524
Forks
16
PR merge metrics
No merged PRs in 30d

Description

``` js
const replaceInstanceId = match({
[when({a:when._, b:when._, c:{e:when._})]:(a, b, e) => {a, b, e}, // extraction
[when(Array)]:(elem) => _.map(elem, replaceInstanceId),
[when()]: _.identity
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.