Skip to content

Commit 51315e3

Browse files
committed
Update unist-util-is
1 parent bd81411 commit 51315e3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: index.js

+3-2
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 = findBefore
66

77
function findBefore(parent, index, test) {
8+
var is = convert(test)
89
var children
910
var child
1011

@@ -30,7 +31,7 @@ function findBefore(parent, index, test) {
3031
while (index--) {
3132
child = children[index]
3233

33-
if (is(test, child, index, parent)) {
34+
if (is(child, index, parent)) {
3435
return child
3536
}
3637
}

Diff for: package.json

+1-1
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)