Skip to content

Support pattern extraction and wildcard #14

@FGRibreau

Description

@FGRibreau
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
});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions