Merges together config data loaded from external JSON files

Merges together JSON data from the specified files, in the specified order. Designed for app config management.

...jsonPathstringthe paths of JSON files to merge. If the JSON data you want to merge is contained within the JSON file, pass an object specifying the jsonPath and configProperty.


var loadConfig = require("config-master");
var homePath = require("home-path");
var config = loadConfig(
    path.join(homePath(), ".config.json"),
    path.join(process.cwd(), ".config.json"),
    { jsonPath: path.join(process.cwd(), "package.json"), configProperty: "dmd" }

© 2015 Lloyd Brookes Documented by jsdoc-to-markdown.