@@ -40,7 +40,7 @@ higher-level (easier) abstraction.
40
40
## Install
41
41
42
42
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] [ ] :
44
44
45
45
``` sh
46
46
npm install nlcst-emoticon-modifier
@@ -64,8 +64,8 @@ In browsers with [`esm.sh`][esmsh]:
64
64
65
65
``` js
66
66
import {emoticonModifier } from ' nlcst-emoticon-modifier'
67
- import {inspect } from ' unist-util-inspect'
68
67
import {ParseEnglish } from ' parse-english'
68
+ import {inspect } from ' unist-util-inspect'
69
69
70
70
const parser = new ParseEnglish ()
71
71
parser .tokenizeSentencePlugins .unshift (emoticonModifier)
@@ -97,7 +97,8 @@ SentenceNode[10] (1:1-1:23, 0-22)
97
97
98
98
## API
99
99
100
- This package exports the identifier [ ` emoticonModifier ` ] [ emoticonmodifier ] .
100
+ This package exports the identifier
101
+ [ ` emoticonModifier ` ] [ api-emoticon-modifier ] .
101
102
There is no default export.
102
103
103
104
### ` emoticonModifier(node) `
@@ -120,17 +121,20 @@ Emoticon node (TypeScript type).
120
121
###### Type
121
122
122
123
``` ts
123
- import type {Literal } from ' nlcst'
124
+ import type {Data , Literal } from ' nlcst'
124
125
125
126
interface Emoticon extends Literal {
126
127
type: ' EmoticonNode'
128
+ data? : EmoticonData | undefined
127
129
}
130
+
131
+ interface EmoticonData extends Data {}
128
132
```
129
133
130
134
## Types
131
135
132
136
This package is fully typed with [ TypeScript] [ ] .
133
- It exports the additional type [ ` Emoticon ` ] [ emoticon ] .
137
+ It exports the additional type [ ` Emoticon ` ] [ api- emoticon] .
134
138
135
139
It also registers the ` Emoticon ` node type with ` @types/nlcst ` in
136
140
` SentenceContentMap ` .
@@ -154,10 +158,13 @@ visit(tree, function (node) {
154
158
155
159
## Compatibility
156
160
157
- Projects maintained by the unified collective are compatible with all maintained
161
+ Projects maintained by the unified collective are compatible with maintained
158
162
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.
161
168
162
169
## Related
163
170
@@ -194,9 +201,9 @@ abide by its terms.
194
201
195
202
[ downloads ] : https://www.npmjs.com/package/nlcst-emoticon-modifier
196
203
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
198
205
199
- [ size ] : https://bundlephobia .com/result?p =nlcst-emoticon-modifier
206
+ [ size ] : https://bundlejs .com/?q =nlcst-emoticon-modifier
200
207
201
208
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
202
209
@@ -236,6 +243,6 @@ abide by its terms.
236
243
237
244
[ wooorm-emoticon ] : https://github.com/wooorm/emoticon
238
245
239
- [ emoticonmodifier ] : #emoticonmodifiernode
246
+ [ api-emoticon-modifier ] : #emoticonmodifiernode
240
247
241
- [ emoticon ] : #emoticon
248
+ [ api- emoticon] : #emoticon
0 commit comments