8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- ** [ unist] [ ] ** utility to pretty print the positional information of a node.
11
+ [ unist] [ ] utility to pretty print the positional info of a node.
12
12
13
13
## Contents
14
14
@@ -39,7 +39,7 @@ For example, when throwing errors or warning messages about something.
39
39
## Install
40
40
41
41
This package is [ ESM only] [ esm ] .
42
- In Node.js (version 12.20+, 14.14+, or 16 .0+), install with [ npm] [ ] :
42
+ In Node.js (version 12.20+, 14.14+, 16.0+, or 18 .0+), install with [ npm] [ ] :
43
43
44
44
``` sh
45
45
npm install unist-util-stringify-position
@@ -83,7 +83,7 @@ There is no default export.
83
83
84
84
### ` stringifyPosition(node|position|point) `
85
85
86
- Stringify a [ point] [ ] , [ position] [ ] , or a [ node] [ ] .
86
+ Stringify a point, position, or node.
87
87
88
88
###### Parameters
89
89
@@ -96,22 +96,23 @@ Stringify a [point][], [position][], or a [node][].
96
96
97
97
###### Returns
98
98
99
- ` string? ` — A range ` ls:cs-le:ce ` (when given ` node ` or ` position ` ) or a point
100
- ` l:c ` (when given ` point ` ), where ` l ` stands for line, ` c ` for column, ` s ` for
101
- ` start ` , and ` e ` for end.
99
+ Pretty printed positional info of a node (` string ` ).
100
+ In the format of a range ` ls:cs-le:ce ` (when given ` node ` or ` position ` ) or a
101
+ point ` l:c ` (when given ` point ` ), where ` l ` stands for line, ` c ` for column, ` s `
102
+ for ` start ` , and ` e ` for end.
102
103
An empty string (` '' ` ) is returned if the given value is neither ` node ` ,
103
104
` position ` , nor ` point ` .
104
105
105
106
## Types
106
107
107
108
This package is fully typed with [ TypeScript] [ ] .
108
- There are no additional types exported .
109
+ It exports no additional types.
109
110
110
111
## Compatibility
111
112
112
113
Projects maintained by the unified collective are compatible with all maintained
113
114
versions of Node.js.
114
- As of now, that is Node.js 12.20+, 14.14+, and 16 .0+.
115
+ As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
115
116
Our projects sometimes work with older versions, but this is not guaranteed.
116
117
117
118
## Security
0 commit comments