{"_id":"merge-settings","_rev":"230924","name":"merge-settings","description":"Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:46:03.000Z","created":"2016-02-04T10:37:16.502Z","0.2.0":"2016-04-07T22:34:48.170Z","0.1.2":"2016-04-03T23:16:47.658Z","0.1.1":"2016-03-21T12:43:05.792Z","0.1.0":"2016-02-04T10:37:16.502Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/merge-settings.git"},"versions":{"0.2.0":{"name":"merge-settings","description":"Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/merge-settings","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/merge-settings.git"},"bugs":{"url":"https://github.com/jonschlinkert/merge-settings/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-flatten":"^1.0.1","arr-union":"^3.1.0","get-value":"^2.0.3","isobject":"^2.0.0","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","set-value":"^0.3.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","map-schema":"^0.2.3","mocha":"^2.4.5"},"keywords":["config","configfile","data","extend","file","get","json","merge","set","settings"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base","data-store","extend-shallow","mixin-deep"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"eb6ec43141c540c93c3f16da04cad0100673c102","_id":"merge-settings@0.2.0","_shasum":"2a7921db0038aca567d7ef48e4ea522bc66fc36a","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2a7921db0038aca567d7ef48e4ea522bc66fc36a","size":4003,"noattachment":false,"key":"/merge-settings/-/merge-settings-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/merge-settings/download/merge-settings-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merge-settings-0.2.0.tgz_1460068486003_0.9819240639917552"},"directories":{},"publish_time":1460068488170,"_cnpm_publish_time":1460068488170,"_hasShrinkwrap":false},"0.1.2":{"name":"merge-settings","description":"Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/merge-settings","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/merge-settings.git"},"bugs":{"url":"https://github.com/jonschlinkert/merge-settings/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-flatten":"^1.0.1","arr-union":"^3.1.0","get-value":"^2.0.3","isobject":"^2.0.0","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","set-value":"^0.3.3"},"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","gulp-unused":"^0.1.2","map-schema":"^0.2.0","mocha":"^2.4.5"},"keywords":["config","configfile","data","extend","file","get","json","merge","set","settings"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base","data-store","extend-shallow","mixin-deep"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"4f7d31f6669f537a53d69b18991a42c728f5b086","_id":"merge-settings@0.1.2","_shasum":"15733ac727e2378951e90a0bb577a6889e29b93f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"15733ac727e2378951e90a0bb577a6889e29b93f","size":3569,"noattachment":false,"key":"/merge-settings/-/merge-settings-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/merge-settings/download/merge-settings-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merge-settings-0.1.2.tgz_1459725405323_0.5592975274194032"},"directories":{},"publish_time":1459725407658,"_cnpm_publish_time":1459725407658,"_hasShrinkwrap":false},"0.1.1":{"name":"merge-settings","version":"0.1.1","description":"Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.","homepage":"https://github.com/jonschlinkert/merge-settings","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/merge-settings.git"},"bugs":{"url":"https://github.com/jonschlinkert/merge-settings/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-flatten":"^1.0.1","get-value":"^2.0.3","isobject":"^2.0.0","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","set-value":"^0.3.3"},"devDependencies":{"gulp-format-md":"^0.1.7","map-schema":"^0.2.0","mocha":"^2.4.5"},"keywords":["config","configfile","data","extend","file","get","json","merge","set","settings"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["mixin-deep","extend-shallow","data-store","base"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"acd08b24b2b67ae2f434e46b24a72ab77a182f70","_id":"merge-settings@0.1.1","_shasum":"ec9985f0b42e652d107291006514d1618e844ca2","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ec9985f0b42e652d107291006514d1618e844ca2","size":3499,"noattachment":false,"key":"/merge-settings/-/merge-settings-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/merge-settings/download/merge-settings-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merge-settings-0.1.1.tgz_1458564183319_0.7997455364093184"},"directories":{},"publish_time":1458564185792,"_cnpm_publish_time":1458564185792,"_hasShrinkwrap":false},"0.1.0":{"name":"merge-settings","description":"Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/merge-settings","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/merge-settings.git"},"bugs":{"url":"https://github.com/jonschlinkert/merge-settings/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"arr-flatten":"^1.0.1","get-value":"^2.0.3","isobject":"^2.0.0","lazy-cache":"^1.0.3","mixin-deep":"^1.1.3","set-value":"^0.3.3"},"devDependencies":{"gulp-format-md":"*","map-schema":"^0.1.1","mocha":"^2.4.5"},"keywords":[],"lintDeps":{"ignore":[]},"verb":{"layout":"default","plugins":["gulp-format-md"],"related":{"list":[]}},"_id":"merge-settings@0.1.0","_shasum":"a78c393aa4e3110255b923357dbcc5a35b3a3d9f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a78c393aa4e3110255b923357dbcc5a35b3a3d9f","size":2951,"noattachment":false,"key":"/merge-settings/-/merge-settings-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/merge-settings/download/merge-settings-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/merge-settings-0.1.0.tgz_1454582235268_0.9947864287532866"},"directories":{},"publish_time":1454582236502,"_cnpm_publish_time":1454582236502,"_hasShrinkwrap":false}},"readme":"# merge-settings [![NPM version](https://img.shields.io/npm/v/merge-settings.svg?style=flat)](https://www.npmjs.com/package/merge-settings) [![NPM downloads](https://img.shields.io/npm/dm/merge-settings.svg?style=flat)](https://npmjs.org/package/merge-settings) [![Build Status](https://img.shields.io/travis/jonschlinkert/merge-settings.svg?style=flat)](https://travis-ci.org/jonschlinkert/merge-settings)\n\n> Load and merge configuration settings from multiple sources, in a specific order, and normalized according to a schema.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install merge-settings --save\n```\n\n## Usage\n\n```js\nvar Settings = require('merge-settings');\n```\n\n## API\n\n### [Settings](index.js#L15)\n\nCreate an instance of `Settings` with the given `options`.\n\n**Params**\n\n* `options` **{Object}**\n\n**Example**\n\n```js\nvar settings = new Settings();\n```\n\n### [.set](index.js#L52)\n\nAdd a `config` object to be merged.\n\n**Params**\n\n* `object` **{Object}**: The object to merge into the config.\n\n**Example**\n\n```js\nconfig\n  .addConfig({a: 'b', c: 'd'})\n  .addConfig({a: 'z'})\n  .merge();\n\n//=> {a: 'z', c: 'd'}\n```\n\n### [.get](index.js#L72)\n\nGet the normalized value of property `key` from the cache.\n\n**Params**\n\n* `key` **{String}**\n* `returns` **{any}**: The normalized value of `key`\n\n**Example**\n\n```js\nconfig.get('foo');\n```\n\n### [.getRaw](index.js#L87)\n\nGet the raw (non-normalized) value of property `key` from the cache.\n\n**Params**\n\n* `key` **{String}**\n* `returns` **{any}**: The value of `key`\n\n**Example**\n\n```js\nconfig.get('foo');\n```\n\n### [.addConfig](index.js#L107)\n\nAdd a `config` object to be merged.\n\n**Params**\n\n* `object` **{Object}**: The object to merge into the config.\n\n**Example**\n\n```js\nconfig\n  .addConfig({a: 'b', c: 'd'})\n  .addConfig({a: 'z'})\n  .merge();\n\n//=> {a: 'z', c: 'd'}\n```\n\n### [.addConfigs](index.js#L133)\n\nAdd an array or list of `config` objects to be merged.\n\n**Params**\n\n* `object` **{Object}**: The object to merge into the config.\n\n**Example**\n\n```js\nconfig\n  .addConfigs({a: 'b'}, {c: 'd'})\n  .addConfigs([{a: 'b'}, {c: 'd'}])\n```\n\n### [.merge](index.js#L177)\n\nMerge the given (optional) `config` object with cached config objects in the order in which the objects were defined. If a `normalize` function is passed on the contructor options, or as the first or second argument to `.merge`, it will be used on each config object before merging it onto the results object.\n\n**Params**\n\n* `config` **{Object}**\n\n**Example**\n\n```js\nvar settings = new Settings()\n  .set('foo', {a: 'b'})\n  .set('bar', {c: 'd'})\n  .set('baz', {e: 'f'})\n  .merge();\n\nconsole.log(settings);\n//=> {a: 'b', c: 'd', e: 'f'}\n\n// Pass a normalize function on the\n// ctor options, or to .merge as first or second arg\nvar settings = new Settings()\n  .set('foo', {a: 'b'})\n  .set('bar', {c: 'd'})\n  .set('baz', {e: 'f'})\n  .merge(function(config) {\n    // normalize config object\n  });\n\nconsole.log(settings);\n//=>\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://www.npmjs.com/package/base) | [homepage](https://github.com/node-base/base)\n* [data-store](https://www.npmjs.com/package/data-store): Easily get, set and persist config data. | [homepage](https://github.com/jonschlinkert/data-store)\n* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow)\n* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/merge-settings/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/merge-settings/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 07, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/merge-settings","bugs":{"url":"https://github.com/jonschlinkert/merge-settings/issues"},"license":"MIT"}