{"versions":{"1.0.0":{"name":"find-config","version":"1.0.0","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","main":"src/find-config.js","scripts":{"bench":"node test/benchmark","coveralls":"nyc report -r text-lcov | coveralls","pretest":"xo src/*.js test/**/*.js","test":"nyc -r html -r text ava -v test/*.js","watch":"watch 'npm test' src test -du --wait=5"},"repository":{"type":"git","url":"https://github.com/shannonmoeller/find-config.git"},"keywords":["config","dot","rc","file","find","glob","xdg"],"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"license":"MIT","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"homepage":"https://github.com/shannonmoeller/find-config","dependencies":{"user-home":"^2.0.0"},"devDependencies":{"ava":"^0.11.0","benchmark":"^2.1.0","coveralls":"^2.11.6","expect":"^1.14.0","findup-sync":"^0.3.0","look-up":"^0.8.3","microtime":"^2.0.0","nyc":"^5.6.0","watch":"^0.17.1","xo":"^0.12.1"},"engines":{"node":">= 0.12"},"gitHead":"2e321f4f423b8515d8bb581861e9374c73ce6e08","_id":"find-config@1.0.0","_shasum":"eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.0","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530","size":10107,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-1.0.0.tgz","integrity":"sha512-Z+suHH+7LSE40WfUeZPIxSxypCWvrzdVc60xAjUShZeT5eMWM0/FQUduq3HjluyfAHWvC/aOBkT1pTZktyF/jg=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/find-config-1.0.0.tgz_1455566519654_0.3447463063057512"},"directories":{},"publish_time":1455566523454,"_hasShrinkwrap":false,"_cnpm_publish_time":1455566523454,"_cnpmcore_publish_time":"2021-12-16T16:20:07.245Z","contributors":[]},"0.3.0":{"name":"find-config","version":"0.3.0","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","keywords":["config","dot","rc","file","find","glob","xdg"],"homepage":"https://github.com/shannonmoeller/find-config","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/shannonmoeller/find-config.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"dependencies":{"user-home":"^1.1.1"},"devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","expect":"^1.6.0","findup-sync":"^0.2.1","gulp":"^3.8.11","gulp-eslint":"^0.11.1","gulp-istanbul":"^0.8.1","gulp-jscs":"^1.5.2","gulp-jshint":"^1.10.0","gulp-mocha":"^2.0.1","jshint-stylish":"^1.0.1","look-up":"^0.7.1","microtime":"^1.4.0"},"gitHead":"e4cb239f8ae5e35145a10c179ec6c69c92c64f58","_id":"find-config@0.3.0","_shasum":"c4f6b2ae491b2cae3ca8af72401f1ad84cfdd0d9","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"c4f6b2ae491b2cae3ca8af72401f1ad84cfdd0d9","size":9878,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-0.3.0.tgz","integrity":"sha512-vJHpnq6yFp6Q0GKR+jlK7hWjxDCbLSSxIu3m1br3T+VURC63APXaEt/gxHr//Ia7Db5gDz3vFogIyj2yCyDdJA=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"directories":{},"publish_time":1432571237141,"_hasShrinkwrap":false,"_cnpm_publish_time":1432571237141,"_cnpmcore_publish_time":"2021-12-16T16:20:07.435Z","contributors":[]},"0.2.0":{"name":"find-config","version":"0.2.0","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","keywords":["config","dot","rc","file","find","glob","xdg"],"homepage":"https://github.com/shannonmoeller/find-config","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/shannonmoeller/find-config.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"dependencies":{"user-home":"^1.1.1"},"devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","expect":"^1.6.0","findup-sync":"^0.2.1","gulp":"^3.8.11","gulp-eslint":"^0.11.1","gulp-istanbul":"^0.8.1","gulp-jscs":"^1.5.2","gulp-jshint":"^1.10.0","gulp-mocha":"^2.0.1","jshint-stylish":"^1.0.1","look-up":"^0.7.1","microtime":"^1.4.0"},"gitHead":"73f8bacfbaceffbaeb83e735778676239b40ff67","_id":"find-config@0.2.0","_shasum":"1c15255f50fc07213143b05142c744a2c2250cec","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"1c15255f50fc07213143b05142c744a2c2250cec","size":9773,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-0.2.0.tgz","integrity":"sha512-zv1dnjKksVkg6m79HO1CBU2GiCsZ3JigGW+ES7qK9EKO0F1TqO98G1M9049njUak8pfQwjzMZzCHKN10EUOojw=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"directories":{},"publish_time":1431021483903,"_hasShrinkwrap":false,"_cnpm_publish_time":1431021483903,"_cnpmcore_publish_time":"2021-12-16T16:20:07.651Z","contributors":[]},"0.1.3":{"name":"find-config","version":"0.1.3","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","keywords":["config","dot","rc","file","find","glob","xdg"],"homepage":"https://github.com/shannonmoeller/find-config","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/shannonmoeller/find-config.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"dependencies":{},"devDependencies":{"benchmark":"^1.0.0","coveralls":"^2.11.2","expect":"^1.6.0","findup-sync":"^0.2.1","gulp":"^3.8.11","gulp-eslint":"^0.11.1","gulp-istanbul":"^0.8.1","gulp-jscs":"^1.5.2","gulp-jshint":"^1.10.0","gulp-mocha":"^2.0.1","jshint-stylish":"^1.0.1","look-up":"^0.7.1","microtime":"^1.4.0"},"gitHead":"79f19ef3acd779a60432ea2a4b28d28ebbc8f3bb","_id":"find-config@0.1.3","_shasum":"d7c4acb013528f446ccf2f11932b1909f48fded4","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"d7c4acb013528f446ccf2f11932b1909f48fded4","size":9520,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-0.1.3.tgz","integrity":"sha512-c+ygGuZYfsmjo5CdLJ65qEsBXW8f9tA6NUSDLtbAbRai5rMmDWXrGetC7c0tT7lR4A7YE/Hs7Wo9Gsp/Fnin6Q=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"directories":{},"publish_time":1430878779195,"_hasShrinkwrap":false,"_cnpm_publish_time":1430878779195,"_cnpmcore_publish_time":"2021-12-16T16:20:07.900Z","contributors":[]},"0.1.1":{"name":"find-config","version":"0.1.1","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","keywords":["config","dot","rc","file","find","glob","xdg"],"homepage":"https://github.com/shannonmoeller/find-config","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/shannonmoeller/find-config.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"dependencies":{},"devDependencies":{"coveralls":"^2.11.2","expect":"^1.6.0","gulp":"^3.8.11","gulp-istanbul":"^0.8.1","gulp-jscs":"^1.5.2","gulp-jshint":"^1.10.0","gulp-mocha":"^2.0.1","jshint-stylish":"^1.0.1"},"gitHead":"673bed768b959b30086de4ffabc66d9abbd8f950","_id":"find-config@0.1.1","_shasum":"d48f47be48b26610a5bf233710ec0405e3e15afb","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"d48f47be48b26610a5bf233710ec0405e3e15afb","size":10020,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-0.1.1.tgz","integrity":"sha512-3Rt6pQn8w4BHHF/WtCwtXjZrvO2RYpKg9ItI5fM+Vsu9E+jbSy+wfpq5Dz9SWfflXgrbBkMuqzMGAajnyY3TzA=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"directories":{},"publish_time":1430746182144,"_hasShrinkwrap":false,"_cnpm_publish_time":1430746182144,"_cnpmcore_publish_time":"2021-12-16T16:20:08.194Z","contributors":[]},"0.1.0":{"name":"find-config","version":"0.1.0","description":"Find the first config file matching a given name in the current directory or the nearest ancestor directory.","keywords":["config","dot","rc","file","find","glob","xdg"],"homepage":"https://github.com/shannonmoeller/find-config","bugs":{"url":"https://github.com/shannonmoeller/find-config/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/shannonmoeller/find-config.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"dependencies":{},"devDependencies":{"coveralls":"^2.11.2","expect":"^1.6.0","gulp":"^3.8.11","gulp-istanbul":"^0.8.1","gulp-jscs":"^1.5.2","gulp-jshint":"^1.10.0","gulp-mocha":"^2.0.1","jshint-stylish":"^1.0.1"},"gitHead":"282b37b433c8544ba3abadec435e7f8d100753da","_id":"find-config@0.1.0","_shasum":"48b20de689920ac039260bbac3b5215e210867c3","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"anonymous","email":"me@shannonmoeller.com"},"dist":{"shasum":"48b20de689920ac039260bbac3b5215e210867c3","size":10013,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/find-config/-/find-config-0.1.0.tgz","integrity":"sha512-yQIg2UgFpDHgXL6MHLOnwocTcqgDzKwR78uuTWifdF7GUzkLmf1dDRft3cwp1JLGj93eMv6CrXlicPaWjKEIWw=="},"maintainers":[{"name":"anonymous","email":"me@shannonmoeller.com"}],"directories":{},"publish_time":1430746091284,"_hasShrinkwrap":false,"_cnpm_publish_time":1430746091284,"_cnpmcore_publish_time":"2021-12-16T16:20:08.537Z","contributors":[]}},"dist-tags":{"latest":"1.0.0"},"name":"find-config","time":{"created":"2022-01-26T22:57:02.613Z","modified":"2023-07-28T11:01:32.589Z","1.0.0":"2016-02-15T20:02:03.454Z","0.3.0":"2015-05-25T16:27:17.141Z","0.2.0":"2015-05-07T17:58:03.903Z","0.1.3":"2015-05-06T02:19:39.195Z","0.1.1":"2015-05-04T13:29:42.144Z","0.1.0":"2015-05-04T13:28:11.284Z"},"readme":"# `find-config`\n\n[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url] [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Chat][gitter-img]][gitter-url] [![Tip][amazon-img]][amazon-url]\n\nFinds the first matching config file, if any, in the current directory, nearest ancestor, or user's home directory. Supports finding files within a subdirectory of an ancestor directory. Configurable with defaults set to support the [XDG Base Directory Specification][xdg] for configuration files.\n\nBecause this module is intended to find consistently named configuration files, it is case-sensitive and does not support globs. If you need a more generic solution, see [findup-sync][fus] or [look-up][lku].\n\n[fus]: https://www.npmjs.com/package/findup-sync\n[lku]: https://www.npmjs.com/package/look-up\n[xdg]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\n\n## Algorithm\n\nWhere X is the current directory:\n\n1. If X/file.ext exists, return it. STOP\n2. If X/.dir/file.ext exists, return it. STOP\n3. If X has a parent directory, change X to parent. GO TO 1\n4. Return NULL.\n\n## Install\n\nWith [Node.js](http://nodejs.org):\n\n    $ npm install find-config\n\n## Usage\n\n```js\nvar findConfig = require('find-config');\n\n// Find the path to the nearest `package.json`\nvar pkg = findConfig('package.json');\n\n// Find the path to the nearest `.foorc` or `.config/foorc`\nvar foo = findConfig('.foorc');\n\n// Find the path to the nearest `.foorc` or `.config/.foorc`\nvar foo = findConfig('.foorc', { dot: true });\n\n// Find the path to the nearest module using Node.js module resolution.\n// Will look for `bar.js` or `bar/index.js`, etc.\nvar foo = findConfig('bar', { module: true });\n\n// Find the path to the nearest `baz.json` or `some/path/baz.json`\nvar foo = findConfig('baz.json', { dir: 'some/path' });\n\n// Find the path to the nearest `qux.json` or `some/path/qux.json` in\n// some other directory or its nearest ancestor directory.\nvar foo = findConfig('qux.json', { cwd: '/other/dir', dir: 'some/path' });\n\n// Find and require the nearest `package.json`\nvar pkg = findConfig.require('package.json');\n\n// Find and read the nearest `.foorc` or `.config/foorc`\nvar foo = findConfig.read('.foorc');\n```\n\n## API\n\n### `findConfig(filename, [options]) : String|Null`\n\n- `filename` `String` - Name of the configuration file to find.\n- `options` `{Object=}`\n  - `cwd` `{String=}` - Directory in which to start looking. (Default: `process.cwd()`)\n  - `dir` `{String=}` - An optional subdirectory to check at each level. (Default: `'.config'`)\n  - `dot` `{Boolean=}` - Whether to keep the leading dot in the filename in `dir`. (Default: `false`)\n  - `home` `{Boolean=}` - Whether to also check the user's home directory. (Default: `true`)\n  - `module` `{Boolean=}` - Whether to use Node.js [module resolution][modres]. (Default: `false`)\n\nSynchronously find the first config file matching a given name in the current directory or the nearest ancestor directory.\n\n[modres]: https://nodejs.org/api/modules.html#modules_all_together\n\n### `findConfig.obj(filename, [options]) : Object|Null`\n\n- `filename` `String` - Name of the configuration file to find.\n- `options` `{Object=}` - Same as `findConfig()`.\n\nFinds first matching config file, if any and returns the matched directories and config file path.\n\n### `findConfig.read(filename, [options]) : String|Null`\n\n- `filename` `String` - Name of the configuration file to find.\n- `options` `{Object=}` - Same as `findConfig()` with two additions.\n  - `encoding` `{String}` - File encoding. (Default: `'utf8'`).\n  - `flag` `{String}` - Flag. (Default: `'r'`).\n\nFinds and reads the first matching config file, if any.\n\n```js\nvar yaml = require('js-yaml');\nvar travis = yaml.safeLoad(findConfig.read('.travis.yml'));\n```\n\n### `findConfig.require(filename, [options]) : *`\n\n- `filename` `String` - Name of the configuration file to find.\n- `options` `{Object=}` - Same as `findConfig()`.\n\nFinds and requires the first matching config file, if any. Implies `module` is `true`.\n\n```js\nvar version = findConfig.require('package.json').version;\n```\n\n## Contribute\n\nStandards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.\n\n## Test\n\n    $ npm test\n\n----\n\n© Shannon Moeller <me@shannonmoeller.com> (shannonmoeller.com)\n\nLicensed under [MIT](http://shannonmoeller.com/mit.txt)\n\n[amazon-img]:    https://img.shields.io/badge/amazon-tip_jar-yellow.svg?style=flat-square\n[amazon-url]:    https://www.amazon.com/gp/registry/wishlist/1VQM9ID04YPC5?sort=universal-price\n[coveralls-img]: http://img.shields.io/coveralls/shannonmoeller/find-config/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/shannonmoeller/find-config\n[downloads-img]: http://img.shields.io/npm/dm/find-config.svg?style=flat-square\n[gitter-img]:    http://img.shields.io/badge/gitter-join_chat-1dce73.svg?style=flat-square\n[gitter-url]:    https://gitter.im/shannonmoeller/shannonmoeller\n[npm-img]:       http://img.shields.io/npm/v/find-config.svg?style=flat-square\n[npm-url]:       https://npmjs.org/package/find-config\n[travis-img]:    http://img.shields.io/travis/shannonmoeller/find-config.svg?style=flat-square\n[travis-url]:    https://travis-ci.org/shannonmoeller/find-config","users":{}}