8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- [ hast] [ ] utility to check if a node is [ * sectioning* ] [ spec ] .
11
+ [ hast] [ ] utility to check if a node is [ * sectioning content * ] [ spec ] .
12
12
13
13
## Contents
14
14
17
17
* [ Install] ( #install )
18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
- * [ ` sectioning(node ) ` ] ( #sectioningnode )
20
+ * [ ` sectioning(value ) ` ] ( #sectioningvalue )
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-sectioning
@@ -85,20 +85,22 @@ sectioning({
85
85
86
86
## API
87
87
88
- This package exports the identifier ` sectioning ` .
88
+ This package exports the identifier [ ` sectioning ` ] [ sectioning ] .
89
89
There is no default export.
90
90
91
- ### ` sectioning(node ) `
91
+ ### ` sectioning(value ) `
92
92
93
- Check if the given value is a [ * sectioning* ] [ spec ] [ * element * ] [ element ] .
93
+ Check if the given value is a [ * sectioning content * ] [ spec ] .
94
94
95
95
###### Parameters
96
96
97
- * ` node ` ([ ` Node ` ] [ node ] ) — node to check
97
+ * ` value ` (` unknown ` ) — thing to check (typically [ ` Node ` ] [ node ] )
98
98
99
99
###### Returns
100
100
101
- Whether ` node ` is sectioning content (` boolean ` ).
101
+ Whether ` value ` is an element considered sectioning content.
102
+
103
+ The elements ` article ` , ` aside ` , ` nav ` , and ` section ` are sectioning.
102
104
103
105
## Types
104
106
@@ -109,7 +111,7 @@ It exports no additional types.
109
111
110
112
Projects maintained by the unified collective are compatible with all maintained
111
113
versions of Node.js.
112
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
114
+ As of now, that is Node.js 14.14+ and 16 .0+.
113
115
Our projects sometimes work with older versions, but this is not guaranteed.
114
116
115
117
## Security
@@ -216,8 +218,8 @@ abide by its terms.
216
218
217
219
[ node ] : https://github.com/syntax-tree/hast#nodes
218
220
219
- [ element ] : https://github.com/syntax-tree/hast#element
220
-
221
221
[ spec ] : https://html.spec.whatwg.org/multipage/dom.html#sectioning-content
222
222
223
223
[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
224
+
225
+ [ sectioning ] : #sectioningvalue
0 commit comments