{"_id":"s-config","_rev":"8-78f4088f0a7d235cce325e4f7b8582f1","name":"s-config","description":"Config from file in constant","dist-tags":{"latest":"1.5.0"},"versions":{"1.2.1":{"name":"s-config","version":"1.2.1","description":"Config from file in constant","main":"index.js","scripts":{"test":"node test/test.js"},"homepage":"https://github.com/sajera/s-config#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-config.git"},"bugs":{"url":"https://github.com/sajera/s-config/issues"},"keywords":["s-config","config","config constant"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"45e986ff6ae3be52729fc74349d974867e7542d6","_id":"s-config@1.2.1","_shasum":"498b74b848f8bb2979c481ae51fede9db200dec7","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.4.7","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"498b74b848f8bb2979c481ae51fede9db200dec7","tarball":"https://registry.npmjs.org/s-config/-/s-config-1.2.1.tgz","integrity":"sha512-ha4FROTFMlUQ6SNE/rktXRYBl+FLTazRwYMlmaQVz4Faedeabzh+OB2Y42NEjJiZ0AwGmC5If22XPTdf6wwGUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCslNZGeVBRLlog3eQPn0PBN9e8losd6R3zQoTW7ghdewIgbp1zcmTF1p6n91qcCKZGeRzlR1bYbRzo+K03aPsVsfI="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/s-config-1.2.1.tgz_1471170415343_0.4654340189881623"}},"1.4.0":{"name":"s-config","version":"1.4.0","description":"Config from file in constant","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","rebuild":"gulp concat&gulp minify","debug":"devtool test/test.js"},"homepage":"https://github.com/sajera/s-config#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-config.git"},"bugs":{"url":"https://github.com/sajera/s-config/issues"},"keywords":["s-config","config","config constant"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{"gulp":"^3.9.1","gulp-concat":"^2.6.1","gulp-order":"^1.1.1","gulp-uglify":"^2.0.0","gulp-wrap":"^0.13.0"},"gitHead":"dcad1d1d606adb863ac4091320014692035e3285","_id":"s-config@1.4.0","_shasum":"a514d96b8bb3406cc6b68cc1b3646517972c646c","_from":".","_npmVersion":"4.0.2","_nodeVersion":"6.9.1","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"a514d96b8bb3406cc6b68cc1b3646517972c646c","tarball":"https://registry.npmjs.org/s-config/-/s-config-1.4.0.tgz","integrity":"sha512-bq6WVoNAmGLKCXIsGHHjSBnUgnrm+ZBeQox893l/++0SxHK+TuKfFY0ZTvk0lcoT0LtU9iopnwMm8kueuTsLOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClAIpr2emaHVq0ZDDSH7SIZI30R/cfu6PJIFEJPW9PWgIhAM8MvOMAXpdudt+mo8MVzD/jpQF4N8aHd9vcctm6vwbY"}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/s-config-1.4.0.tgz_1481569294770_0.7216790516395122"}},"1.5.0":{"name":"s-config","version":"1.5.0","description":"Config from file in constant","main":"s-config.min.js","scripts":{"rebuild":"gulp build&&npm run test&&gulp doc&&gulp doc-md","test":"gulp lint&&gulp test","debug":"devtool test/debug"},"homepage":"https://github.com/sajera/s-config#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-config.git"},"bugs":{"url":"https://github.com/sajera/s-config/issues"},"keywords":["s-config","config","config constant"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{"chai":"^3.5.0","devtool":"^2.3.1","documentation":"^5.2.1","eslint":"^3.12.2","gulp":"^3.9.1","gulp-concat":"^2.6.1","gulp-documentation":"^3.1.0","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1","gulp-order":"^1.1.1","gulp-uglify":"^2.0.0","gulp-wrap":"^0.13.0","mocha":"^3.2.0","q":"^1.4.1","s-is":"^1.2.0"},"gitHead":"8b4e820e45d742e70ec64b507813f5b3050efa0e","_id":"s-config@1.5.0","_shasum":"fd48d6bdcab0ed7e3c8e07a522faceb8a5093d8d","_from":".","_npmVersion":"4.0.2","_nodeVersion":"6.9.1","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"fd48d6bdcab0ed7e3c8e07a522faceb8a5093d8d","tarball":"https://registry.npmjs.org/s-config/-/s-config-1.5.0.tgz","integrity":"sha512-14w5lLAb15mR3fEagSuvlJy5lr74WK1BGN7AbYmLOOU/uFvlstLb/OVRxQ09EWEyIEvSQ1o0Yje/8wInkhwd6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8GPb78I+9FXs/lUR94Z48Yueiosj/eV7c01py7VBTPQIgOVmI+4PCCLzXigcWCWSxgP+arNZznIT2meXNS6orqFA="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s-config-1.5.0.tgz_1502815885786_0.3869336391799152"}}},"readme":"\r\n[![NPM version][npm-image]][npm-url]\r\n[![License][license-image]][license-url]\r\n\r\ns-config\r\n===============\r\n### Config from file in constant\r\n\r\n### installation\r\n```shell\r\nnpm i s-config --save\r\n```\r\n\r\nBasic usage:\r\n---------------\r\n\r\n```javascript\r\n\r\nvar config = require('s-config')('config-id', './path/to/source/config.json');\r\n\r\n```\r\n\r\n\r\nConstant:\r\n---------------\r\n\r\n```javascript\r\n\r\nvar config = require('s-config')('config-id', './path/to/source/config.json');\r\n\r\n// it isn't the same object, but it equal of origin\r\nvar assert = require('assert');\r\nassert.notStrictEqual(config, require('s-config')('config-id'), 'Completely fail ...');\r\n\r\n```\r\n**Note:** Emulation of constant - prevents change of field values in the configuration at runtime.\r\n\r\nMerge-config :\r\n--------------\r\n\r\n```javascript\r\n\r\nvar config = require('s-config')('config-id',\r\n    './config.env',                              // minimum priority \r\n    './config.json',\r\n    {some: 'hardcode'},\r\n    './environment/db.json',\r\n    {another: 'hardcode'}                        // maximum priority \r\n);\r\n\r\n```\r\n**Note:** Find you way to create the present huge configs and methods of management.\r\n\r\nRead:\r\n---------------\r\n\r\n```javascript\r\n\r\nvar configMap = require('s-config');\r\n// only read config without adding to config map\r\nvar config1 = configMap.read('./path/to/source/config.json');\r\n// only read config without adding to config map\r\nvar config2 = configMap.read('./path/to/source/config.env');\r\n\r\n\r\n// Emulation of the \"dotenv\" approach\r\n// read of environment variable from '.env' and write it in process\r\nObject.assign(process.env, require('s-config').read('.env') );\r\n// expand of environment variable from environment file\r\nObject.assign(process.env, require('s-config').read('./config/env/'+process.env.NODE_ENV+'.env') );\r\n\r\n```\r\n**Note:** The file extension is required for any method of reading config.\r\n\r\n\r\n\r\n\r\n\r\n\r\n#### [```API documentation ```](https://github.com/sajera/s-config/blob/master/doc/API.md)\r\n\r\n[npm-image]: https://badge.fury.io/js/s-config.svg\r\n[npm-url]: https://npmjs.org/package/s-config\r\n[license-image]: http://img.shields.io/npm/l/s-is.svg\r\n[license-url]: LICENSE\r\n","maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"time":{"modified":"2022-06-26T15:08:18.489Z","created":"2016-08-14T10:26:56.988Z","1.2.1":"2016-08-14T10:26:56.988Z","1.4.0":"2016-12-12T19:01:35.340Z","1.5.0":"2017-08-15T16:51:27.810Z"},"homepage":"https://github.com/sajera/s-config#readme","keywords":["s-config","config","config constant"],"repository":{"type":"git","url":"git+https://github.com/sajera/s-config.git"},"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"bugs":{"url":"https://github.com/sajera/s-config/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"tmurngon":true}}