package-json-editor
npm package editor that preserve newline and indentation
This is a mere wrapper around automerge
so that we can use to edit npm package tree and preserve all the indentation, newline settings.
We can use this package to edit the tree directly using .set()
method or we can edit the tree object directly and merge the new tree onto the old tree later with .merge()
.
Usage
var packageJsonEditor = var originTree = fsvar mutated = JSONmutateddependenciesdebug = '^1.0.0'mutateddescription = 'new description'delete mutatedlicense var newTree = // orvar anotherTree =