8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- Stringify [ unist] [ unist ] [ ` Position ` ] [ position ] s or [ ` Point ` ] [ point ] s .
11
+ [ ** unist** ] [ unist ] utility to pretty print the positional information of a node .
12
12
13
- ## Installation
13
+ ## Install
14
14
15
15
[ npm] [ ] :
16
16
17
- ``` bash
17
+ ``` sh
18
18
npm install unist-util-stringify-position
19
19
```
20
20
21
21
## Usage
22
22
23
- ``` javascript
23
+ ``` js
24
24
var stringify = require (' unist-util-stringify-position' )
25
25
26
26
// Point
27
27
stringify ({line: 2 , column: 3 }) // => '2:3'
28
28
29
29
// Position
30
- stringify ({
31
- start: {line: 2 },
32
- end: {line: 3 }
33
- }) // => '2:1-3:1'
30
+ stringify ({start: {line: 2 }, end: {line: 3 }}) // => '2:1-3:1'
34
31
35
32
// Node
36
33
stringify ({
@@ -47,7 +44,8 @@ stringify({
47
44
48
45
### ` stringifyPosition(node|position|point) `
49
46
50
- Stringify one point, a position (start and end points), or a node’s position.
47
+ Stringify one [ point] [ ] , a [ position] [ ] (start and end [ point] [ ] s), or a node’s
48
+ [ positional information] [ positional-information ] .
51
49
52
50
###### Parameters
53
51
@@ -68,11 +66,13 @@ An empty string (`''`) is returned if the given value is neither `node`,
68
66
69
67
## Contribute
70
68
71
- See [ ` contributing.md ` in ` syntax-tree/unist ` ] [ contributing ] for ways to get
69
+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
72
70
started.
71
+ See [ ` support.md ` ] [ support ] for ways to get help.
73
72
74
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
75
- repository, organisation, or community you agree to abide by its terms.
73
+ This project has a [ Code of Conduct] [ coc ] .
74
+ By interacting with this repository, organisation, or community you agree to
75
+ abide by its terms.
76
76
77
77
## License
78
78
@@ -112,6 +112,12 @@ repository, organisation, or community you agree to abide by its terms.
112
112
113
113
[ author ] : https://wooorm.com
114
114
115
+ [ contributing ] : https://github.com/syntax-tree/.github/blob/master/contributing.md
116
+
117
+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
118
+
119
+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
120
+
115
121
[ unist ] : https://github.com/syntax-tree/unist
116
122
117
123
[ node ] : https://github.com/syntax-tree/unist#node
@@ -120,6 +126,4 @@ repository, organisation, or community you agree to abide by its terms.
120
126
121
127
[ point ] : https://github.com/syntax-tree/unist#point
122
128
123
- [ contributing ] : https://github.com/syntax-tree/unist/blob/master/contributing.md
124
-
125
- [ coc ] : https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
129
+ [ positional-information ] : https://github.com/syntax-tree/unist#positional-information
0 commit comments