1.5.3 • Published 9 years ago

extend-json v1.5.3

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

extend-json Build status

extend-json is a npm module for populating JSON files, with other JSON files or a specified function.

to extend Objects

">>fileB": {"file" : "./fileB.json"}

to extend Arrays

[{">>fileB": {"file" : "./fileB.json", "replace":true}}]
var extendJSON = require('./index');
var fileA = require('./fileA.json');

extendJSON(fileA).then(function (json) {
   console.log(JSON.stringify(json, null, 4))
}).catch(function (e) {
    console.log('error', e);
});

Options are optional and default to

extendJSON(fileA, {pointer:'>>', path:'./'})
1.5.3

9 years ago

1.5.0

9 years ago

1.0.0

9 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago