Skip to content

Update unist-util-is #1

Closed
Closed
@wooorm

Description

@wooorm

Hi! 👋

I was planning on updating this, but unist-util-is removed equality checks in favour of partial property checks (syntax-tree/unist-util-is#1, I remember we talked about that issue, maybe on Gitter?)

Anyway, this project uses equality checks a lot (in tests and examples at least). So what should we do?

a) overwrite partial checks with a type (e.g., remove(tree, {type: 'listItem'})) as an equality tests?
b) expect people to pass in equality checks themselves (e.g., remove(tree, n => n === someNode)).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions