8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- [ ** Unist** ] [ unist ] utility to get the source of a [ ` Node ` ] [ node ] or
12
- [ ` Position ` ] [ position ] .
11
+ [ ** unist** ] [ unist ] utility to get the source of a node or at a position.
13
12
14
- ## Installation
13
+ ## Install
15
14
16
15
[ npm] [ ] :
17
16
18
- ``` bash
17
+ ``` sh
19
18
npm install unist-util-source
20
19
```
21
20
@@ -59,19 +58,21 @@ Now, running `node example` yields:
59
58
###### Parameters
60
59
61
60
* ` value ` ([ ` Node ` ] [ node ] or [ ` Position ` ] [ position ] ) — Value to get
62
- * ` doc ` ([ ` VFile ` ] [ vfile ] or ` string ` ) — Document in which ` value ` exists
61
+ * ` doc ` ([ ` VFile ` ] [ vfile ] or ` string ` ) — [ file ] [ ] in which ` value ` exists
63
62
64
63
###### Returns
65
64
66
- ` string? ` — Source of ` value ` in ` file ` , if available.
65
+ ` string? ` — Source of ` value ` in ` doc ` , if available.
67
66
68
67
## Contribute
69
68
70
- 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
71
70
started.
71
+ See [ ` support.md ` ] [ support ] for ways to get help.
72
72
73
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
74
- 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.
75
76
76
77
## License
77
78
@@ -111,6 +112,12 @@ repository, organisation, or community you agree to abide by its terms.
111
112
112
113
[ author ] : https://wooorm.com
113
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
+
114
121
[ unist ] : https://github.com/syntax-tree/unist
115
122
116
123
[ node ] : https://github.com/syntax-tree/unist#node
@@ -119,6 +126,4 @@ repository, organisation, or community you agree to abide by its terms.
119
126
120
127
[ vfile ] : https://github.com/vfile/vfile
121
128
122
- [ contributing ] : https://github.com/syntax-tree/unist/blob/master/contributing.md
123
-
124
- [ coc ] : https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
129
+ [ file ] : https://github.com/syntax-tree/unist#file
0 commit comments