@@ -43,7 +43,7 @@ does the same but for [remark][].
43
43
## Install
44
44
45
45
This package is [ ESM only] [ esm ] .
46
- In Node.js (version 12.20+, 14.14+, or 16.0+), install with [ npm] [ ] :
46
+ In Node.js (version 14.14+ and 16.0+), install with [ npm] [ ] :
47
47
48
48
``` sh
49
49
npm install mdast-util-normalize-headings
@@ -95,27 +95,34 @@ Yields:
95
95
96
96
## API
97
97
98
- This package exports the identifier ` normalizeHeadings ` .
98
+ This package exports the identifier
99
+ [ ` normalizeHeadings ` ] [ api-normalizeheadings ] .
99
100
There is no default export.
100
101
101
102
### ` normalizeHeadings(tree) `
102
103
103
- Normalize heading depths.
104
+ Make sure that there is only one top-level heading in the document by adjusting
105
+ headings depths accordingly.
106
+
107
+ ###### Parameters
108
+
109
+ * ` tree ` ([ ` Node ` ] [ node ] )
110
+ — tree to change
104
111
105
112
###### Returns
106
113
107
- The given ` tree ` ([ ` Node ` ] [ node ] ).
114
+ Given, modified, ` tree ` ([ ` Node ` ] [ node ] ).
108
115
109
116
## Types
110
117
111
118
This package is fully typed with [ TypeScript] [ ] .
112
- There are no additional exported types.
119
+ It exports no additional types.
113
120
114
121
## Compatibility
115
122
116
123
Projects maintained by the unified collective are compatible with all maintained
117
124
versions of Node.js.
118
- As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
125
+ As of now, that is Node.js 14.14+ and 16.0+.
119
126
Our projects sometimes work with older versions, but this is not guaranteed.
120
127
121
128
## Security
@@ -199,3 +206,5 @@ abide by its terms.
199
206
[ remark ] : https://github.com/remarkjs/remark
200
207
201
208
[ remark-normalize-headings ] : https://github.com/remarkjs/remark-normalize-headings
209
+
210
+ [ api-normalizeheadings ] : #normalizeheadingstree
0 commit comments