File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @typedef {import('unist').Node } Node
3
+ * @typedef {import('unist').Position } Position
4
+ * @typedef {import('vfile').VFile } VFile
5
+ * @typedef {import('vfile').VFileValue } VFileValue
6
+ */
7
+
1
8
import { location } from 'vfile-location'
2
9
3
10
const search = / \r ? \n | \r / g
4
11
5
12
/**
6
- * @param {import('unist').Node|import('unist').Position } value Value to get
7
- * @param {import('vfile').VFile|import('vfile').VFileValue } file File in which `value` exists
13
+ * Get the source of a node or at a position.
14
+ *
15
+ * @param {Node|Position } value
16
+ * Value to get.
17
+ * @param {VFile|VFileValue } file
18
+ * File in which `value` exists.
8
19
* @returns {string|null }
20
+ * Source of a node.
9
21
*/
10
22
export function source ( value , file ) {
11
23
const doc = String ( file )
You can’t perform that action at this time.
0 commit comments