17
17
* [ Install] ( #install )
18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
- * [ ` affixEmoticonModifier(paragraph) ` ] ( #affixemoticonmodifierparagraph )
20
+ * [ ` affixEmoticonModifier(node) ` ] ( #affixemoticonmodifiernode )
21
+ * [ ` Emoticon ` ] ( #emoticon )
21
22
* [ Types] ( #types )
22
23
* [ Compatibility] ( #compatibility )
23
24
* [ Related] ( #related )
@@ -45,7 +46,7 @@ higher-level (easier) abstraction.
45
46
## Install
46
47
47
48
This package is [ ESM only] [ esm ] .
48
- In Node.js (version 12.20+, 14.14+, 16.0+, 18 .0+), install with [ npm] [ ] :
49
+ In Node.js (version 14.14+ and 16 .0+), install with [ npm] [ ] :
49
50
50
51
``` sh
51
52
npm install nlcst-affix-emoticon-modifier
@@ -54,14 +55,14 @@ npm install nlcst-affix-emoticon-modifier
54
55
In Deno with [ ` esm.sh ` ] [ esmsh ] :
55
56
56
57
``` js
57
- import {affixEmoticonModifier } from " https://esm.sh/nlcst-affix-emoticon-modifier@2"
58
+ import {affixEmoticonModifier } from ' https://esm.sh/nlcst-affix-emoticon-modifier@2'
58
59
```
59
60
60
61
In browsers with [ ` esm.sh ` ] [ esmsh ] :
61
62
62
63
``` html
63
64
<script type =" module" >
64
- import {affixEmoticonModifier } from " https://esm.sh/nlcst-affix-emoticon-modifier@2?bundle"
65
+ import {affixEmoticonModifier } from ' https://esm.sh/nlcst-affix-emoticon-modifier@2?bundle'
65
66
</script >
66
67
```
67
68
@@ -110,19 +111,36 @@ RootNode[1] (1:1-1:25, 0-24)
110
111
111
112
## API
112
113
113
- This package exports the identifier ` affixEmoticonModifier ` .
114
+ This package exports the identifier
115
+ [ ` affixEmoticonModifier ` ] [ affixemoticonmodifier ] .
114
116
There is no default export.
115
117
116
- ### ` affixEmoticonModifier(paragraph ) `
118
+ ### ` affixEmoticonModifier(node ) `
117
119
118
- Merge affix emoticons (` EmoticonNode ` ) in ` node ` ([ ` Paragraph ` ] [ paragraph ] ).
120
+ Merge emoticons in ` node ` into ` EmoticonNode ` s.
121
+
122
+ ###### Parameters
123
+
124
+ * ` node ` ([ ` Paragraph ` ] [ paragraph ] )
125
+ — nlcst paragraph to transform
126
+
127
+ ###### Returns
128
+
129
+ Nothing (` void ` ).
130
+
131
+ ### ` Emoticon `
132
+
133
+ Emoticon node (TypeScript type).
134
+
135
+ See [ ` Emoticon ` in ` nlcst-emoticon-modifier ` ] [ emoticon-mofifier-emoticon ] .
119
136
120
137
## Types
121
138
122
139
This package is fully typed with [ TypeScript] [ ] .
123
- It exports no additional types .
140
+ It exports the additional type [ ` Emoticon ` ] [ emoticon ] .
124
141
125
- It also registers the ` Emoticon ` node type with ` @types/nlcst ` .
142
+ It also registers the ` Emoticon ` node type with ` @types/nlcst ` in
143
+ ` SentenceContentMap ` .
126
144
If you’re working with the syntax tree, make sure to import this utility
127
145
somewhere in your types, as that registers the new node types in the tree.
128
146
@@ -145,7 +163,7 @@ visit(tree, (node) => {
145
163
146
164
Projects maintained by the unified collective are compatible with all maintained
147
165
versions of Node.js.
148
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
166
+ As of now, that is Node.js 14.14+ and 16 .0+.
149
167
Our projects sometimes work with older versions, but this is not guaranteed.
150
168
151
169
## Related
@@ -226,3 +244,9 @@ abide by its terms.
226
244
[ nlcst-emoticon-modifier ] : https://github.com/syntax-tree/nlcst-emoticon-modifier
227
245
228
246
[ nlcst-emoji-modifier ] : https://github.com/syntax-tree/nlcst-emoji-modifier
247
+
248
+ [ emoticon-mofifier-emoticon ] : https://github.com/syntax-tree/nlcst-emoticon-modifier#emoticon
249
+
250
+ [ affixemoticonmodifier ] : #affixemoticonmodifiernode
251
+
252
+ [ emoticon ] : #emoticon
0 commit comments