Config.get()

Get simply a config with few json file

For example, see tests/test.js (mocha tests/test.js)

Usage

Hover over inputs/exits for more info.

var Config = require('machinepack-config');


// Get simply a config with few json file

Config.get({

path: '*',

merge: false,

nomethod: false,

freeze: false,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

path required

An array of path of json file, ex : see tests/test.js

merge

if false, the name of the files are the keys else it'll merge at the top

false
nomethod

if true, don't attach method 'get', 'all' and some other lodash method (keys, findKeys, ...)

false
freeze

if true, freeze config

false

Exits

error

An unexpected error occurred.

success

OK.