8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- [ hast] [ ] utility to check if a node is [ * script-supporting* ] [ spec ] .
11
+ [ hast] [ ] utility to check if a node is a [ * script-supporting* element ] [ spec ] .
12
12
13
13
## Contents
14
14
17
17
* [ Install] ( #install )
18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
- * [ ` scriptSupporting(node ) ` ] ( #scriptsupportingnode )
20
+ * [ ` scriptSupporting(value ) ` ] ( #scriptsupportingvalue )
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-script-supporting
@@ -79,20 +79,22 @@ scriptSupporting({
79
79
80
80
## API
81
81
82
- This package exports the identifier ` scriptSupporting ` .
82
+ This package exports the identifier [ ` scriptSupporting ` ] [ scriptsupporting ] .
83
83
There is no default export.
84
84
85
- ### ` scriptSupporting(node ) `
85
+ ### ` scriptSupporting(value ) `
86
86
87
- Check if the given value is a [ * script-supporting* ] [ spec ] [ * element* ] [ element ] .
87
+ Check if the given value is a [ * script-supporting* element] [ spec ] .
88
88
89
89
###### Parameters
90
90
91
- * ` node ` ([ ` Node ` ] [ node ] ) — node to check
91
+ * ` value ` (` unknown ` ) — thing to check (typically [ ` Node ` ] [ node ] )
92
92
93
93
###### Returns
94
94
95
- Whether the ` value ` is script-supporting (` boolean ` ).
95
+ Whether ` value ` is a script-supporting element (` boolean ` ).
96
+
97
+ The elements ` script ` and ` template ` are script-supporting.
96
98
97
99
## Types
98
100
@@ -103,7 +105,7 @@ It exports no additional types.
103
105
104
106
Projects maintained by the unified collective are compatible with all maintained
105
107
versions of Node.js.
106
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
108
+ As of now, that is Node.js 14.14+ and 16 .0+.
107
109
Our projects sometimes work with older versions, but this is not guaranteed.
108
110
109
111
## Security
@@ -206,12 +208,12 @@ abide by its terms.
206
208
207
209
[ coc ] : https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
208
210
209
- [ spec ] : https://html.spec.whatwg.org/#script-supporting-elements
211
+ [ spec ] : https://html.spec.whatwg.org/multipage/dom.html #script-supporting-elements
210
212
211
213
[ hast ] : https://github.com/syntax-tree/hast
212
214
213
- [ element ] : https://github.com/syntax-tree/hast#element
214
-
215
215
[ node ] : https://github.com/syntax-tree/hast#nodes
216
216
217
217
[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
218
+
219
+ [ scriptsupporting ] : #scriptsupportingvalue
0 commit comments