Skip to content

Commit f4c44df

Browse files
committed
Refactor docs
1 parent 3d73d14 commit f4c44df

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

readme.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ higher-level (easier) abstraction.
4040
## Install
4141

4242
This package is [ESM only][esm].
43-
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
43+
In Node.js (version 16+), install with [npm][]:
4444

4545
```sh
4646
npm install nlcst-emoticon-modifier
@@ -64,8 +64,8 @@ In browsers with [`esm.sh`][esmsh]:
6464

6565
```js
6666
import {emoticonModifier} from 'nlcst-emoticon-modifier'
67-
import {inspect} from 'unist-util-inspect'
6867
import {ParseEnglish} from 'parse-english'
68+
import {inspect} from 'unist-util-inspect'
6969

7070
const parser = new ParseEnglish()
7171
parser.tokenizeSentencePlugins.unshift(emoticonModifier)
@@ -97,7 +97,8 @@ SentenceNode[10] (1:1-1:23, 0-22)
9797

9898
## API
9999

100-
This package exports the identifier [`emoticonModifier`][emoticonmodifier].
100+
This package exports the identifier
101+
[`emoticonModifier`][api-emoticon-modifier].
101102
There is no default export.
102103

103104
### `emoticonModifier(node)`
@@ -120,17 +121,20 @@ Emoticon node (TypeScript type).
120121
###### Type
121122

122123
```ts
123-
import type {Literal} from 'nlcst'
124+
import type {Data, Literal} from 'nlcst'
124125

125126
interface Emoticon extends Literal {
126127
type: 'EmoticonNode'
128+
data?: EmoticonData | undefined
127129
}
130+
131+
interface EmoticonData extends Data {}
128132
```
129133

130134
## Types
131135

132136
This package is fully typed with [TypeScript][].
133-
It exports the additional type [`Emoticon`][emoticon].
137+
It exports the additional type [`Emoticon`][api-emoticon].
134138

135139
It also registers the `Emoticon` node type with `@types/nlcst` in
136140
`SentenceContentMap`.
@@ -154,10 +158,13 @@ visit(tree, function (node) {
154158

155159
## Compatibility
156160

157-
Projects maintained by the unified collective are compatible with all maintained
161+
Projects maintained by the unified collective are compatible with maintained
158162
versions of Node.js.
159-
As of now, that is Node.js 14.14+ and 16.0+.
160-
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+
`nlcst-emoticon-modifier@^2`, compatible with Node.js 12.
161168

162169
## Related
163170

@@ -194,9 +201,9 @@ abide by its terms.
194201

195202
[downloads]: https://www.npmjs.com/package/nlcst-emoticon-modifier
196203

197-
[size-badge]: https://img.shields.io/bundlephobia/minzip/nlcst-emoticon-modifier.svg
204+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=nlcst-emoticon-modifier
198205

199-
[size]: https://bundlephobia.com/result?p=nlcst-emoticon-modifier
206+
[size]: https://bundlejs.com/?q=nlcst-emoticon-modifier
200207

201208
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
202209

@@ -236,6 +243,6 @@ abide by its terms.
236243

237244
[wooorm-emoticon]: https://github.com/wooorm/emoticon
238245

239-
[emoticonmodifier]: #emoticonmodifiernode
246+
[api-emoticon-modifier]: #emoticonmodifiernode
240247

241-
[emoticon]: #emoticon
248+
[api-emoticon]: #emoticon

0 commit comments

Comments
 (0)