Skip to content

Commit 248bfe1

Browse files
committed
Update unist-util-is
1 parent f2462a7 commit 248bfe1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

index.js

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

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

5-
module.exports = isPhrasing
6-
7-
var phrasing = [
5+
var isPhrasing = convert([
86
'break',
97
'delete',
108
'emphasis',
@@ -17,9 +15,7 @@ var phrasing = [
1715
'linkReference',
1816
'strong',
1917
'text'
20-
]
18+
])
2119

22-
// Check if a node is a phrasing element.
23-
function isPhrasing(node) {
24-
return is(phrasing, node)
25-
}
20+
isPhrasing.displayName = 'isPhrasing'
21+
module.exports = isPhrasing

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"index.js"
2424
],
2525
"dependencies": {
26-
"unist-util-is": "^2.1.1"
26+
"unist-util-is": "^3.0.0"
2727
},
2828
"devDependencies": {
2929
"nyc": "^14.0.0",

0 commit comments

Comments
 (0)