{"id":17766635,"url":"https://github.com/floatdrop/configs-overload","last_synced_at":"2025-07-04T18:37:48.035Z","repository":{"id":14749619,"uuid":"17470761","full_name":"floatdrop/configs-overload","owner":"floatdrop","description":"Load configs file with ease","archived":false,"fork":false,"pushed_at":"2024-11-07T13:02:38.000Z","size":58,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T10:57:28.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatdrop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-06T08:16:48.000Z","updated_at":"2024-11-07T13:02:36.000Z","dependencies_parsed_at":"2024-10-26T21:10:04.229Z","dependency_job_id":"0f0d6253-e0d1-43d3-a22c-8838501d8ec4","html_url":"https://github.com/floatdrop/configs-overload","commit_stats":{"total_commits":29,"total_committers":4,"mean_commits":7.25,"dds":0.3793103448275862,"last_synced_commit":"fc20b50b23fd0a16acd24c04d6129b374ecf521e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/floatdrop/configs-overload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fconfigs-overload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fconfigs-overload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fconfigs-overload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fconfigs-overload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatdrop","download_url":"https://codeload.github.com/floatdrop/configs-overload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fconfigs-overload/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263597841,"owners_count":23486453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T20:33:34.648Z","updated_at":"2025-07-04T18:37:48.015Z","avatar_url":"https://github.com/floatdrop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# configs-overload \n[![NPM Version](https://badge.fury.io/js/configs-overload.png)](https://npmjs.org/package/configs-overload) [![Build Status](https://travis-ci.org/floatdrop/configs-overload.png?branch=master)](https://travis-ci.org/floatdrop/configs-overload) [![Coverage Status](https://coveralls.io/repos/floatdrop/configs-overload/badge.png?branch=master)](https://coveralls.io/r/floatdrop/configs-overload) [![Dependency Status](https://gemnasium.com/floatdrop/configs-overload.png)](https://gemnasium.com/floatdrop/configs-overload)\n\n\u003e Load configs with ease\n\nThis package helps you to organize your configurations and load them on per-environment basis. Also it have default file, which reduce amount of repetative key-value pairs between configuration files. \n\n## Installation\n\n`npm install configs-overload`\n\n## Example\n\nConsider, you have directory with following structure:\n\n```\n.\n└── configs\n    ├── default.js\n    ├── development.js\n    ├── production.js\n    ├── stress.json\n    └── testing\n        └── index.js\n```\n\nAnd this code in application:\n\n```js\nvar config = require('configs-overload')('./configs', { env: 'production' });\n```\n\n`configs-overoload` will load configs from `default.js` and extend them with object loaded from `production.js`.\n\n## API\n\n### configs-overload([directory, options])\n\n#### directory\n\nType: `String` Default: `path.join(process.cwd(), 'configs')`\n\nPath to directory with config files.\n\n#### options\n\nType: `Object`\n\n * `defaultEnv` - name of default environment, which will be overloaded with current environment (default: `process.env.NODE_DEFAULT_ENV` or `default`)\n * `env` - Environment name which will override `defaultEnv` (default: `process.env.NODE_ENV` or `defaultEnv`).\n\n## Environment variables\n\n * `NODE_CONFIG_DIR` - default directory, if it not specified in options.\n * `NODE_DEFAULT_ENV` - \"default\" environment name\n * `NODE_ENV` - environment name\n\n## Methods\n\n* `extend(...objects)` - loads configs in directory over already loaded. Object can be:\n    * `string` with path to file - require(path) and extend config with result.\n    * `string` with path to directory - load configs directory in directory in default order.\n    * `object` - extend config with object.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Vsevolod Strukchinsky and other [contributors](https://github.com/floatdrop/configs-overload/blob/master/CONTRIBUTORS.md)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fconfigs-overload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatdrop%2Fconfigs-overload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fconfigs-overload/lists"}