File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 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+
18import { location } from 'vfile-location'
29
310const search = / \r ? \n | \r / g
411
512/**
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.
819 * @returns {string|null }
20+ * Source of a node.
921 */
1022export function source ( value , file ) {
1123 const doc = String ( file )
You can’t perform that action at this time.
0 commit comments