unist utility to get the source of a node or at a position.
npm install unist-util-source
Say we have the following file,
> + **[Hello](./example)**> world.
And our script,
example.js, looks as follows:
var vfile =var unified =var parse =var source =var file = vfilevar tree =var list = treechildren0children0console
node example yields:
string? — Source of
doc, if available.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.