gulp-transform-json
A gulp plugin to transform json on the fly using glob patterns; useful for validating and changing data before it is consumed by your application.
install
$ npm i --save-dev gulp-transform-json
use
The below example changes all foo
keys in object.json
to baz
:
object.json
gulpfile.js
var gulp = ;var transformJson = ; gulp
You can also change the values asynchronously:
gulpfile.js
var gulp = ;var transformJson = ; gulp
tests
$ npm test
roadmap
- support streams
- allow multiple mutations in one traversal of the object
- write more varied glob tests