36
36
## Install
37
37
38
38
This package is [ ESM only] [ esm ] .
39
- In Node.js (version 12.20+, 14.14+, 16.0+, or 18 .0+), install with [ npm] [ ] :
39
+ In Node.js (version 14.14+ and 16 .0+), install with [ npm] [ ] :
40
40
41
41
``` sh
42
42
npm install unist-util-position-from-estree
@@ -92,12 +92,21 @@ Yields:
92
92
93
93
## API
94
94
95
- This package exports the identifier ` positionFromEstree ` .
95
+ This package exports the identifier [ ` positionFromEstree ` ] [ positionfromestree ] .
96
96
There is no default export.
97
97
98
98
### ` positionFromEstree(node) `
99
99
100
- Given a [ ` node ` ] [ estree ] , returns a [ ` position ` ] [ position ] .
100
+ Turn an estree ` node ` into a unist ` position ` .
101
+
102
+ ###### Parameters
103
+
104
+ * ` node ` ([ ` Node ` ] [ node ] )
105
+ — estree node
106
+
107
+ ###### Returns
108
+
109
+ unist position ([ ` Position ` ] [ position ] ).
101
110
102
111
## Types
103
112
@@ -108,7 +117,7 @@ It exports no additional types.
108
117
109
118
Projects maintained by the unified collective are compatible with all maintained
110
119
versions of Node.js.
111
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
120
+ As of now, that is Node.js 14.14+ and 16 .0+.
112
121
Our projects sometimes work with older versions, but this is not guaranteed.
113
122
114
123
## Contribute
@@ -175,6 +184,10 @@ abide by its terms.
175
184
176
185
[ estree ] : https://github.com/estree/estree
177
186
187
+ [ node ] : https://github.com/estree/estree/blob/master/es5.md#node-objects
188
+
178
189
[ unist ] : https://github.com/syntax-tree/unist
179
190
180
191
[ position ] : https://github.com/syntax-tree/unist#position
192
+
193
+ [ positionfromestree ] : #positionfromestreenode
0 commit comments