Skip to content

Commit 11acf88

Browse files
committed
Mention migration info for new unist-util-is
1 parent ccaa2df commit 11acf88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ remove(ast, ast)
6161

6262
Iterates over `ast` in preorder traversal and removes all nodes matching `predicate` from `ast`. Returns a modified [Unist] tree.
6363

64+
> Note: `unist-util-is` used to remove a node when given as `test`.
65+
> This no longer works. To migrate, pass a function as a predicate, like so:
66+
> `remove(ast, function (node) { return node === predicate; })`.
67+
6468
##### `opts.cascade`
6569

6670
Type: `Boolean`<br>

0 commit comments

Comments
 (0)