Skip to content

Commit 7d1461c

Browse files
committed
Update dev-dependencies
1 parent 52b1370 commit 7d1461c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function isElement(node, test, index, parent, context) {
1212

1313
if (
1414
index != null &&
15-
(typeof index !== 'number' || index < 0 || index === Infinity)
15+
(typeof index !== 'number' ||
16+
index < 0 ||
17+
index === Number.POSITIVE_INFINITY)
1618
) {
1719
throw new Error('Expected positive finite index for child node')
1820
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"convert.js",
2828
"index.js"
2929
],
30-
"dependencies": {},
3130
"devDependencies": {
3231
"browserify": "^17.0.0",
3332
"nyc": "^15.0.0",
@@ -36,7 +35,7 @@
3635
"remark-preset-wooorm": "^8.0.0",
3736
"tape": "^5.0.0",
3837
"tinyify": "^3.0.0",
39-
"xo": "^0.34.0"
38+
"xo": "^0.38.0"
4039
},
4140
"scripts": {
4241
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ test('isElement', function (t) {
184184

185185
st.throws(
186186
function () {
187-
isElement(root.children[0], function () {}, Infinity)
187+
isElement(root.children[0], function () {}, Number.POSITIVE_INFINITY)
188188
},
189189
/Expected positive finite index for child node/,
190190
'should throw if `index` is infinity'

0 commit comments

Comments
 (0)