Skip to content

Commit 9aa62ed

Browse files
committed
Add docs on explicit nullish test
1 parent f7459ff commit 9aa62ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ declare namespace unistUtilIs {
4949
* Unist utility to check if a node passes a test.
5050
*
5151
* @param node Node to check.
52-
* @param test When not given, checks if `node` is a `Node`.
52+
* @param test When nullish, checks if `node` is a `Node`.
5353
* When `string`, works like passing `function (node) {return node.type === test}`.
5454
* When `function` checks if function passed the node is true.
5555
* When `object`, checks that all keys in test are in node, and that they have (strictly) equal values.

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ is(node, test, 5, parent) // => true
5353

5454
* `node` ([`Node`][node]) — Node to check.
5555
* `test` ([`Function`][test], `string`, `Object`, or `Array.<Test>`, optional)
56-
— When not given, checks if `node` is a [`Node`][node].
56+
— When nullish, checks if `node` is a [`Node`][node].
5757
When `string`, works like passing `node => node.type === test`.
5858
When `array`, checks if any one of the subtests pass.
5959
When `object`, checks that all keys in `test` are in `node`,

0 commit comments

Comments
 (0)