We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unist-util-is
1 parent f2462a7 commit 248bfe1Copy full SHA for 248bfe1
index.js
@@ -1,10 +1,8 @@
1
'use strict'
2
3
-var is = require('unist-util-is')
+var convert = require('unist-util-is/convert')
4
5
-module.exports = isPhrasing
6
-
7
-var phrasing = [
+var isPhrasing = convert([
8
'break',
9
'delete',
10
'emphasis',
@@ -17,9 +15,7 @@ var phrasing = [
17
15
'linkReference',
18
16
'strong',
19
'text'
20
-]
+])
21
22
-// Check if a node is a phrasing element.
23
-function isPhrasing(node) {
24
- return is(phrasing, node)
25
-}
+isPhrasing.displayName = 'isPhrasing'
+module.exports = isPhrasing
package.json
@@ -23,7 +23,7 @@
"index.js"
],
"dependencies": {
26
- "unist-util-is": "^2.1.1"
+ "unist-util-is": "^3.0.0"
27
},
28
"devDependencies": {
29
"nyc": "^14.0.0",
0 commit comments