Skip to content

Include destructured object literal patterns #7

@roli93

Description

@roli93

Include pattern to match destrcutured objects only if they match the pattern properties:

const sumProps = (obj) => match(obj) (
  ({a, b, c}) => a+b+c,
  ({a, b}) => a+b
)

sumProps({a:1,b:2}) //returns 3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions