8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- [ hast] [ ] utility to check if a node is [ * embedded* ] [ spec ] .
11
+ [ hast] [ ] utility to check if a node is [ * embedded content * ] [ spec ] .
12
12
13
13
## Contents
14
14
17
17
* [ Install] ( #install )
18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
- * [ ` embedded(node ) ` ] ( #embeddednode )
20
+ * [ ` embedded(value ) ` ] ( #embeddedvalue )
21
21
* [ Types] ( #types )
22
22
* [ Compatibility] ( #compatibility )
23
23
* [ Security] ( #security )
@@ -38,7 +38,7 @@ looking for!
38
38
## Install
39
39
40
40
This package is [ ESM only] [ esm ] .
41
- In Node.js (version 12.20+, 14.14+, 16.0+, or 18 .0+), install with [ npm] [ ] :
41
+ In Node.js (version 14.14+ and 16 .0+), install with [ npm] [ ] :
42
42
43
43
``` sh
44
44
npm install hast-util-embedded
@@ -82,20 +82,24 @@ embedded({
82
82
83
83
## API
84
84
85
- This package exports the following identifiers: ` embedded ` .
85
+ This package exports the identifier [ ` embedded ` ] [ embedded ] .
86
86
There is no default export.
87
87
88
- ### ` embedded(node ) `
88
+ ### ` embedded(value ) `
89
89
90
- Check if ` node ` is an [ * embedded* ] [ spec ] [ * element * ] [ element ] .
90
+ Check if ` node ` is an [ * embedded content * ] [ spec ] .
91
91
92
92
###### Parameters
93
93
94
- * ` node ` ([ ` Node ` ] [ node ] ) — node to check
94
+ * ` value ` (` unknown ` )
95
+ — thing to check (typically [ ` Node ` ] [ node ] )
95
96
96
97
###### Returns
97
98
98
- Whether ` node ` is embedded content (` boolean ` ).
99
+ Whether ` value ` is an element considered embedded content (` boolean ` ).
100
+
101
+ The elements ` audio ` , ` canvas ` , ` embed ` , ` iframe ` , ` img ` , ` math ` ,
102
+ ` object ` , ` picture ` , ` svg ` , and ` video ` are embedded content.
99
103
100
104
## Types
101
105
@@ -106,7 +110,7 @@ It exports no additional types.
106
110
107
111
Projects maintained by the unified collective are compatible with all maintained
108
112
versions of Node.js.
109
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
113
+ As of now, that is Node.js 14.14+ and 16 .0+.
110
114
Our projects sometimes work with older versions, but this is not guaranteed.
111
115
112
116
## Security
@@ -215,6 +219,6 @@ abide by its terms.
215
219
216
220
[ node ] : https://github.com/syntax-tree/hast#nodes
217
221
218
- [ element ] : https://github.com/syntax-tree/hast#element
219
-
220
222
[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
223
+
224
+ [ embedded ] : #embeddedvalue
0 commit comments