File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -62,28 +62,18 @@ const meta = convertElement('meta')
62
62
/**
63
63
* Check if the given value is *phrasing* content.
64
64
*
65
- * @param {unknown } value
66
- * Thing to check, typically `Node` .
65
+ * @param {Nodes } value
66
+ * Node to check.
67
67
* @returns {boolean }
68
68
* Whether `value` is phrasing content.
69
69
*/
70
70
export function phrasing ( value ) {
71
71
return Boolean (
72
- node ( value ) &&
73
- ( value . type === 'text' ||
74
- basic ( value ) ||
75
- embedded ( value ) ||
76
- // @ts -expect-error: To do: update `hast-util-is-body-ok-link` in `rehype-minify`.
77
- isBodyOkLink ( value ) ||
78
- ( meta ( value ) && hasProperty ( value , 'itemProp' ) ) )
72
+ value . type === 'text' ||
73
+ basic ( value ) ||
74
+ embedded ( value ) ||
75
+ // @ts -expect-error: To do: update `hast-util-is-body-ok-link` in `rehype-minify`.
76
+ isBodyOkLink ( value ) ||
77
+ ( meta ( value ) && hasProperty ( value , 'itemProp' ) )
79
78
)
80
79
}
81
-
82
- /**
83
- * @param {unknown } value
84
- * @returns {value is Nodes }
85
- */
86
- function node ( value ) {
87
- // @ts -expect-error: looks like an object.
88
- return value && typeof value === 'object' && 'type' in value
89
- }
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ Check if the given value is [*phrasing*][spec] content.
105
105
106
106
###### Parameters
107
107
108
- * ` value ` (` unknown ` )
109
- — thing to check, typically [ ` Node ` ] [ node ]
108
+ * ` value ` ([ ` Node ` ] [ node ] )
109
+ — node to check
110
110
111
111
###### Returns
112
112
You can’t perform that action at this time.
0 commit comments