Skip to content

Commit b42bf68

Browse files
committed
Refactor docs
1 parent cdb014e commit b42bf68

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

readme.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ It turns the tree into a string of JavaScript.
4545
## Install
4646

4747
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][]:
4949

5050
```sh
5151
npm install esast-util-from-js
@@ -117,7 +117,7 @@ Yields:
117117

118118
## API
119119

120-
This package exports the identifier [`fromJs`][fromjs].
120+
This package exports the identifier [`fromJs`][api-from-js].
121121
There is no default export.
122122

123123
### `fromJs(value[, options])`
@@ -126,9 +126,9 @@ Parse JavaScript to an esast.
126126

127127
###### Parameters
128128

129-
* `value` ([`Value`][value])
129+
* `value` ([`Value`][api-value])
130130
— serialized JavaScript to parse
131-
* `options` ([`Options`][options], optional)
131+
* `options` ([`Options`][api-options], optional)
132132
— configuration
133133

134134
###### Returns
@@ -152,7 +152,7 @@ Configuration (TypeScript type).
152152

153153
###### `version`
154154

155-
JavaScript version ([`Version`][version], default: `'latest'`).
155+
JavaScript version ([`Version`][api-version], default: `'latest'`).
156156

157157
When a number, must be a year in the range `2015` and `2023` (both including).
158158
`'latest'` is the same as passing the latest supported year.
@@ -190,7 +190,7 @@ Whether a shell hasbang is allowed (`boolean`, default: `false`).
190190

191191
###### `plugins`
192192

193-
List of acorn plugins ([`Array<Plugin>`][plugin], default: `[]`).
193+
List of acorn plugins ([`Array<Plugin>`][api-plugin], default: `[]`).
194194
Examples are [`acorn-jsx`][acorn-jsx] and [`acorn-stage3`][acorn-stage3].
195195

196196
### `Plugin`
@@ -230,15 +230,20 @@ type Version = 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 'l
230230
## Types
231231
232232
This package is fully typed with [TypeScript][].
233-
It exports the additional types [`Options`][options], [`Plugin`][plugin],
234-
[`Value`][value], and [`Version`][version].
233+
It exports the additional types [`Options`][api-options],
234+
[`Plugin`][api-plugin],
235+
[`Value`][api-value], and
236+
[`Version`][api-version].
235237
236238
## Compatibility
237239
238-
Projects maintained by the unified collective are compatible with all maintained
240+
Projects maintained by the unified collective are compatible with maintained
239241
versions of Node.js.
240-
As of now, that is Node.js 14.14+ and 16.0+.
241-
Our projects sometimes work with older versions, but this is not guaranteed.
242+
243+
When we cut a new major release, we drop support for unmaintained versions of
244+
Node.
245+
This means we try to keep the current release line, `esast-util-from-js@^1`,
246+
compatible with Node.js 12.
242247
243248
## Contribute
244249
@@ -268,9 +273,9 @@ abide by its terms.
268273
269274
[downloads]: https://www.npmjs.com/package/esast-util-from-js
270275
271-
[size-badge]: https://img.shields.io/bundlephobia/minzip/esast-util-from-js.svg
276+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=esast-util-from-js
272277
273-
[size]: https://bundlephobia.com/result?p=esast-util-from-js
278+
[size]: https://bundlejs.com/?q=esast-util-from-js
274279
275280
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
276281
@@ -322,12 +327,12 @@ abide by its terms.
322327
323328
[vfile-message]: https://github.com/vfile/vfile-message
324329
325-
[fromjs]: #fromjsvalue-options
330+
[api-from-js]: #fromjsvalue-options
326331
327-
[options]: #options
332+
[api-options]: #options
328333
329-
[plugin]: #plugin
334+
[api-plugin]: #plugin
330335
331-
[value]: #value
336+
[api-value]: #value
332337
333-
[version]: #version-1
338+
[api-version]: #version-1

0 commit comments

Comments
 (0)