vfile-update
Update paths on nested vfiles
Update nested vfile paths in a given vfile's contents. Both update and update.undo return modified copies of the vfile passed to them and don't affect the original.
install
npm i vfile-update
usage
var vfile = var update = var file = var updated = console// ['bar.txt', 'foo/bar/bar.txt'] var undone = updateconsole
api
update (file)
Creates a copy of file and updates paths on its contents. returns the updated copy of file.
returns VFile
file
VFile
VFile to work on
update#undo (file)
Creates a copy of file and undoes update on sub vfile's history.
returns VFile
file
VFile
License
MIT © Paul Zimmer