@@ -43,7 +43,7 @@ and similar to [`hastscript`][hastscript].
4343## Install
4444
4545This package is [ ESM only] [ esm ] .
46- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
46+ In Node.js (version 16 +), install with [ npm] [ ] :
4747
4848``` sh
4949npm install hast-util-from-selector
@@ -98,7 +98,7 @@ Yields:
9898
9999## API
100100
101- This package exports the identifier [ ` fromSelector ` ] [ fromselector ] .
101+ This package exports the identifier [ ` fromSelector ` ] [ api-from-selector ] .
102102There is no default export.
103103
104104### ` fromSelector(selector?[, options]) `
@@ -107,9 +107,9 @@ Create one or more [`Element`][element]s from a CSS selector.
107107
108108###### Parameters
109109
110- * ` selector ` (` string ` , optional )
110+ * ` selector ` (` string ` , default: ` '' ` )
111111 — CSS selector
112- * ` options ` ([ ` Options ` ] [ options ] , optional)
112+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
113113 — configuration
114114
115115###### Returns
@@ -122,7 +122,7 @@ Configuration (TypeScript type).
122122
123123###### Fields
124124
125- * ` space ` ([ ` Space ` ] [ space ] , optional )
125+ * ` space ` ([ ` Space ` ] [ api- space] , default: ` 'html' ` )
126126 — which space first element in the selector is in.
127127 When an ` svg ` element is created in HTML, the space is automatically
128128 switched to SVG
@@ -153,14 +153,18 @@ type Space = 'html' | 'svg'
153153## Types
154154
155155This package is fully typed with [TypeScript][].
156- It exports the additional types [ ` Options ` ][options] and [ ` Space ` ][space].
156+ It exports the additional types [ ` Options ` ][api-options] and
157+ [ ` Space ` ][api-space].
157158
158159## Compatibility
159160
160- Projects maintained by the unified collective are compatible with all maintained
161+ Projects maintained by the unified collective are compatible with maintained
161162versions of Node.js.
162- As of now, that is Node.js 14.14+ and 16.0+.
163- Our projects sometimes work with older versions, but this is not guaranteed.
163+
164+ When we cut a new major release, we drop support for unmaintained versions of
165+ Node.
166+ This means we try to keep the current release line,
167+ ` hast -util -from -selector @^2 ` , compatible with Node.js 12.
164168
165169## Security
166170
@@ -204,9 +208,9 @@ abide by its terms.
204208
205209[downloads]: https://www.npmjs.com/package/hast-util-from-selector
206210
207- [size-badge]: https://img.shields.io/bundlephobia/minzip/ hast-util-from-selector.svg
211+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= hast-util-from-selector
208212
209- [size]: https://bundlephobia .com/result?p =hast-util-from-selector
213+ [size]: https://bundlejs .com/?q =hast-util-from-selector
210214
211215[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
212216
@@ -250,8 +254,8 @@ abide by its terms.
250254
251255[hastscript]: https://github.com/syntax-tree/hastscript
252256
253- [fromselector ]: #fromselectorselector-options
257+ [api-from-selector ]: #fromselectorselector-options
254258
255- [options]: #options
259+ [api- options]: #options
256260
257- [space]: #space
261+ [api- space]: #space
0 commit comments