Skip to content

Commit 543ff97

Browse files
committed
Update unist-util-is
1 parent d7fdee6 commit 543ff97

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict'
22

3-
var is = require('unist-util-is')
3+
var convert = require('unist-util-is/convert')
44

55
module.exports = findAfter
66

77
function findAfter(parent, index, test) {
8+
var is = convert(test)
89
var children
910
var child
1011
var length
@@ -27,7 +28,7 @@ function findAfter(parent, index, test) {
2728
while (++index < length) {
2829
child = children[index]
2930

30-
if (is(test, child, index, parent)) {
31+
if (is(child, index, parent)) {
3132
return child
3233
}
3334
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"index.js"
2222
],
2323
"dependencies": {
24-
"unist-util-is": "^2.0.0"
24+
"unist-util-is": "^3.0.0"
2525
},
2626
"devDependencies": {
2727
"browserify": "^16.0.0",

0 commit comments

Comments
 (0)