JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 154607
  • Score
    100M100P100Q153160F

Merges together config data loaded from external JSON files

Package Exports

  • config-master

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (config-master) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads per month Build Status Dependency Status

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

  • ...jsonPath string the 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.

Returns: Object - the merged JSON data

####Example

var loadConfig = require("config-master");

var storedConfig = loadConfig(
    "~/.global-defaults.json", 
    "project-specific-defaults.json", 
    { jsonPath: "package.json", configProperty: "config" }
);