@@ -45,7 +45,7 @@ for any [unist][] node.
45
45
## Install
46
46
47
47
This package is [ ESM only] [ esm ] .
48
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
48
+ In Node.js (version 16 +), install with [ npm] [ ] :
49
49
50
50
``` sh
51
51
npm install hast-util-assert
@@ -83,8 +83,11 @@ assert({type: 'element', properties: {}, children: []})
83
83
84
84
## API
85
85
86
- This package exports the identifiers [ ` _void ` ] [ void ] , [ ` assert ` ] [ assert ] ,
87
- [ ` literal ` ] [ literal ] , [ ` parent ` ] [ parent ] , and [ ` wrap ` ] [ wrap ] .
86
+ This package exports the identifiers [ ` _void ` ] [ api-void ] ,
87
+ [ ` assert ` ] [ api-assert ] ,
88
+ [ ` literal ` ] [ api-literal ] ,
89
+ [ ` parent ` ] [ api-parent ] , and
90
+ [ ` wrap ` ] [ api-wrap ] .
88
91
There is no default export.
89
92
90
93
### ` assert(tree[, parent]) `
@@ -109,7 +112,7 @@ Nothing.
109
112
###### Throws
110
113
111
114
When ` tree ` (or its descendants) is not a hast node
112
- ([ ` AssertionError ` ] [ assertionerror ] ).
115
+ ([ ` AssertionError ` ] [ api-assertion-error ] ).
113
116
114
117
### ` parent(tree[, parent]) `
115
118
@@ -133,7 +136,7 @@ Nothing.
133
136
###### Throws
134
137
135
138
When ` tree ` is not a parent or its descendants are not nodes
136
- ([ ` AssertionError ` ] [ assertionerror ] )
139
+ ([ ` AssertionError ` ] [ api-assertion-error ] )
137
140
138
141
### ` literal(node[, parent]) `
139
142
@@ -154,7 +157,7 @@ Nothing.
154
157
155
158
###### Throws
156
159
157
- When ` node ` is not a hast literal ([ ` AssertionError ` ] [ assertionerror ] ).
160
+ When ` node ` is not a hast literal ([ ` AssertionError ` ] [ api-assertion-error ] ).
158
161
159
162
### ` _void(node[, parent]) `
160
163
@@ -166,19 +169,22 @@ Re-exported from [`unist-util-assert`][unist-util-assert-wrap].
166
169
167
170
### ` AssertionError `
168
171
169
- Re-exported from [ ` unist-util-assert ` ] [ unist-util-assert-assertionerror ] .
172
+ Re-exported from [ ` unist-util-assert ` ] [ unist-util-assert-assertion-error ] .
170
173
171
174
## Types
172
175
173
176
This package is fully typed with [ TypeScript] [ ] .
174
- It exports the additional type [ ` AssertionError ` ] [ assertionerror ] .
177
+ It exports the additional type [ ` AssertionError ` ] [ api-assertion-error ] .
175
178
176
179
## Compatibility
177
180
178
- Projects maintained by the unified collective are compatible with all maintained
181
+ Projects maintained by the unified collective are compatible with maintained
179
182
versions of Node.js.
180
- As of now, that is Node.js 14.14+ and 16.0+.
181
- Our projects sometimes work with older versions, but this is not guaranteed.
183
+
184
+ When we cut a new major release, we drop support for unmaintained versions of
185
+ Node.
186
+ This means we try to keep the current release line, ` hast-util-assert@^3 ` ,
187
+ compatible with Node.js 12.
182
188
183
189
## Security
184
190
@@ -222,9 +228,9 @@ abide by its terms.
222
228
223
229
[ downloads ] : https://www.npmjs.com/package/hast-util-assert
224
230
225
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ hast-util-assert.svg
231
+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= hast-util-assert
226
232
227
- [ size ] : https://bundlephobia .com/result?p =hast-util-assert
233
+ [ size ] : https://bundlejs .com/?q =hast-util-assert
228
234
229
235
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
230
236
@@ -270,20 +276,20 @@ abide by its terms.
270
276
271
277
[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
272
278
273
- [ void ] : #_voidnode-parent
279
+ [ unist-util-assert- void] : https://github.com/syntax-tree/unist-util-assert #_voidnode-parent
274
280
275
- [ assert ] : #asserttree-parent
281
+ [ unist-util- assert-wrap ] : https://github.com/syntax-tree/unist-util-assert#wrapfn
276
282
277
- [ literal ] : #literalnode-parent
283
+ [ unist-util-assert-assertion-error ] : https://github.com/syntax-tree/unist-util-assert#assertionerror
278
284
279
- [ parent ] : #parenttree -parent
285
+ [ api-void ] : #_voidnode -parent
280
286
281
- [ wrap ] : #wrapfn
287
+ [ api-assert ] : #asserttree-parent
282
288
283
- [ assertionerror ] : #assertionerror
289
+ [ api-literal ] : #literalnode-parent
284
290
285
- [ unist-util-assert-void ] : https://github.com/syntax-tree/unist-util-assert#_voidnode -parent
291
+ [ api-parent ] : #parenttree -parent
286
292
287
- [ unist-util-assert- wrap] : https://github.com/syntax-tree/unist-util-assert #wrapfn
293
+ [ api- wrap] : #wrapfn
288
294
289
- [ unist-util-assert-assertionerror ] : https://github.com/syntax-tree/unist-util-assert #assertionerror
295
+ [ api-assertion-error ] : #assertionerror
0 commit comments