88[ ![ Backers] [ backers-badge ]] [ collective ]
99[ ![ Chat] [ chat-badge ]] [ chat ]
1010
11- [ hast] [ ] utility to check if a node is [ * sectioning* ] [ spec ] .
11+ [ hast] [ ] utility to check if a node is [ * sectioning content * ] [ spec ] .
1212
1313## Contents
1414
1717* [ Install] ( #install )
1818* [ Use] ( #use )
1919* [ API] ( #api )
20- * [ ` sectioning(node ) ` ] ( #sectioningnode )
20+ * [ ` sectioning(value ) ` ] ( #sectioningvalue )
2121* [ Types] ( #types )
2222* [ Compatibility] ( #compatibility )
2323* [ Security] ( #security )
@@ -38,7 +38,7 @@ looking for!
3838## Install
3939
4040This 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] [ ] :
4242
4343``` sh
4444npm install hast-util-sectioning
@@ -85,20 +85,22 @@ sectioning({
8585
8686## API
8787
88- This package exports the identifier ` sectioning ` .
88+ This package exports the identifier [ ` sectioning ` ] [ sectioning ] .
8989There is no default export.
9090
91- ### ` sectioning(node ) `
91+ ### ` sectioning(value ) `
9292
93- Check if the given value is a [ * sectioning* ] [ spec ] [ * element * ] [ element ] .
93+ Check if the given value is a [ * sectioning content * ] [ spec ] .
9494
9595###### Parameters
9696
97- * ` node ` ([ ` Node ` ] [ node ] ) — node to check
97+ * ` value ` (` unknown ` ) — thing to check (typically [ ` Node ` ] [ node ] )
9898
9999###### Returns
100100
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.
102104
103105## Types
104106
@@ -109,7 +111,7 @@ It exports no additional types.
109111
110112Projects maintained by the unified collective are compatible with all maintained
111113versions 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+.
113115Our projects sometimes work with older versions, but this is not guaranteed.
114116
115117## Security
@@ -216,8 +218,8 @@ abide by its terms.
216218
217219[ node ] : https://github.com/syntax-tree/hast#nodes
218220
219- [ element ] : https://github.com/syntax-tree/hast#element
220-
221221[ spec ] : https://html.spec.whatwg.org/multipage/dom.html#sectioning-content
222222
223223[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
224+
225+ [ sectioning ] : #sectioningvalue
0 commit comments