FGRibreau / FGRibreau/match-when
Support pattern extraction and wildcard
Open
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.