{"id":13903233,"url":"https://github.com/jonschlinkert/merge-configs","last_synced_at":"2025-06-26T20:37:55.181Z","repository":{"id":57294754,"uuid":"92685942","full_name":"jonschlinkert/merge-configs","owner":"jonschlinkert","description":"Find, load and merge JSON and YAML config settings from one or more files, in the specified order.","archived":false,"fork":false,"pushed_at":"2018-11-19T15:36:23.000Z","size":30,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-03T14:40:00.771Z","etag":null,"topics":["combine","conf","config","configuration","data","eslint","find","jonschlinkert","lookup","merge","namespace","node","nodejs","object","package","rc","runtime-config","search","store"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-28T20:41:17.000Z","updated_at":"2024-01-12T19:06:24.000Z","dependencies_parsed_at":"2022-08-30T22:30:43.227Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/merge-configs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jonschlinkert/merge-configs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmerge-configs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmerge-configs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmerge-configs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmerge-configs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/merge-configs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmerge-configs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260471564,"owners_count":23014249,"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":["combine","conf","config","configuration","data","eslint","find","jonschlinkert","lookup","merge","namespace","node","nodejs","object","package","rc","runtime-config","search","store"],"created_at":"2024-08-06T22:01:53.706Z","updated_at":"2025-06-26T20:37:55.117Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":["nodejs"],"sub_categories":[],"readme":"# merge-configs [![NPM version](https://img.shields.io/npm/v/merge-configs.svg?style=flat)](https://www.npmjs.com/package/merge-configs) [![NPM monthly downloads](https://img.shields.io/npm/dm/merge-configs.svg?style=flat)](https://npmjs.org/package/merge-configs) [![NPM total downloads](https://img.shields.io/npm/dt/merge-configs.svg?style=flat)](https://npmjs.org/package/merge-configs) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/merge-configs.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/merge-configs)\n\n\u003e Find, load and merge JSON and YAML config settings from one or more files, in the specified order.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save merge-configs\n```\n\n### What does this do?\n\nThis library makes it easy for your application to support config files similar to `.eslintrc.json`, `.travis.yml`, etc. by providing granular control over:\n\n* the patterns and directories to search for config files\n* how config files are loaded (or whether or not they should be loaded at all)\n* which config files are merged, and how they are merged\n\n## Usage\n\n```js\nconst configs = require('merge-configs');\nconsole.log(configs(name[, locations, options]));\n```\n\n## options\n\n### options.builtins\n\n**Type**: `boolean`\n\n**Default**: `undefined`\n\nDisable built-in loaders.\n\n```js\nconst mergeConfig = new MergeConfig({\n  options: {\n    builtins: false\n  }  \n});\n```\n\n### options.filter\n\n**Type**: `function`\n\n**Default**: `undefined`\n\nFilter files that are resolved by glob patterns. Useful for conditionally filtering out files based on contents or other variables.\n\n```js\n// can be defined on the ctor options\nconst mergeConfig = new MergeConfig({\n  options: {\n    filter: file =\u003e {\n      // \"file\" is an object with path properties\n      return file.basename === 'foo.json'\n    }\n  }  \n});\n\n// or on the options for a specific config type\nmergeConfig.type('local', {\n  cwd: process.cwd(),\n  patterns: ['*.json'],\n  filter: file =\u003e {\n    return file.basename !== 'foo.json';\n  }\n});\n```\n\n### Params\n\n* `name` **{String}** - (required) The module name (example: `eslint`, `babel`, `travis` etc)\n* `types` **{Array}** - (optional) The [config locations](#config-locations) or \"types\" to search. If specified, only the given locations will be searched. If undefined, all locations are searched.\n* `options` **{Object}** - see all [available options](#options)\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 19, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmerge-configs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fmerge-configs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmerge-configs/lists"}