{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dist-tags":{"latest":"2.1.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Find a file by walking up parent directories","readme":"# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)\n\n> Find a file by walking up parent directories\n\n\n## Install\n\n```\n$ npm install --save find-up\n```\n\n\n## Usage\n\n```\n/\n└── Users\n\t\t└── sindresorhus\n\t\t\t\t├── unicorn.png\n\t\t\t\t└── foo\n\t\t\t\t\t\t└── bar\n\t\t\t\t\t\t\t\t├── baz\n\t\t\t\t\t\t\t\t└── example.js\n```\n\n```js\n// example.js\nconst findUp = require('find-up');\n\nfindUp('unicorn.png').then(filepath => {\n\tconsole.log(filepath);\n\t//=> '/Users/sindresorhus/unicorn.png'\n});\n\nfindUp(['rainbow.png', 'unicorn.png']).then(filepath => {\n\tconsole.log(filepath);\n\t//=> '/Users/sindresorhus/unicorn.png'\n});\n```\n\n\n## API\n\n### findUp(filename, [options])\n\nReturns a `Promise` for the filepath or `null`.\n\n### findUp([filenameA, filenameB], [options])\n\nReturns a `Promise` for the first filepath found (by respecting the order) or `null`.\n\n### findUp.sync(filename, [options])\n\nReturns a filepath or `null`.\n\n### findUp.sync([filenameA, filenameB], [options])\n\nReturns the first filepath found (by respecting the order) or `null`.\n\n#### filename\n\nType: `string`\n\nFilename of the file to find.\n\n#### options\n\n##### cwd\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nDirectory to start from.\n\n\n## Related\n\n- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module\n- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file\n- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up.git"},"users":{"ierceg":true,"mrzmmr":true,"bryan.ygf":true},"bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"license":"MIT","versions":{"1.0.0":{"name":"find-up","version":"1.0.0","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/find-up"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"path-exists":"^2.0.0","pinkie-promise":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"9bf0f46fd04d04902cc4934f418ca49cdf199d83","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up","_id":"find-up@1.0.0","_shasum":"df0a54abeebdf9984168fa556bd18a8f24b4d15c","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"df0a54abeebdf9984168fa556bd18a8f24b4d15c","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.1.0":{"name":"find-up","version":"1.1.0","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/find-up"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"path-exists":"^2.0.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"06e9dae73659ddf2421440ca4695161c38d7d2fb","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up","_id":"find-up@1.1.0","_shasum":"a63b0eec4625a2902534898a5f9eec8aaed046e9","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a63b0eec4625a2902534898a5f9eec8aaed046e9","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.1.1":{"name":"find-up","version":"1.1.1","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/find-up"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"path-exists":"^2.0.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"bc536485bfddd2d960f472964e65afef9895f475","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up","_id":"find-up@1.1.1","_shasum":"53bdfb982c41e97ba7f64173d239b406cfd79f85","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"53bdfb982c41e97ba7f64173d239b406cfd79f85","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-1.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/find-up-1.1.1.tgz_1456910658734_0.6790364829357713"},"directories":{}},"1.1.2":{"name":"find-up","version":"1.1.2","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/find-up"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"path-exists":"^2.0.0","pinkie-promise":"^2.0.0"},"devDependencies":{"ava":"*","tempfile":"^1.1.1","xo":"*"},"gitHead":"f2d7c1ff74fbac82b2cff038e311ef4b075d9184","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up","_id":"find-up@1.1.2","_shasum":"6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-1.1.2.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/find-up-1.1.2.tgz_1457199955637_0.3445317060686648"},"directories":{}},"2.0.0":{"name":"find-up","version":"2.0.0","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"path-exists":"^2.0.0"},"devDependencies":{"ava":"*","tempfile":"^1.1.1","xo":"*"},"xo":{"esnext":true},"gitHead":"80342293c547b6982091f6ff141a76fd70317f57","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up#readme","_id":"find-up@2.0.0","_shasum":"71e6dc2dad9222143cfc0fa5de7ab739e7320c05","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"71e6dc2dad9222143cfc0fa5de7ab739e7320c05","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/find-up-2.0.0.tgz_1474388027708_0.42646232759580016"},"directories":{}},"2.1.0":{"name":"find-up","version":"2.1.0","description":"Find a file by walking up parent directories","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"locate-path":"^2.0.0"},"devDependencies":{"ava":"*","tempfile":"^1.1.1","xo":"*"},"xo":{"esnext":true},"gitHead":"10202fb1621f0c277d5d5eeaf01c1c32b008fbef","bugs":{"url":"https://github.com/sindresorhus/find-up/issues"},"homepage":"https://github.com/sindresorhus/find-up#readme","_id":"find-up@2.1.0","_shasum":"45d1b7e506c717ddd482775a2b77920a3c0c57a7","_from":".","_npmVersion":"4.0.2","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"45d1b7e506c717ddd482775a2b77920a3c0c57a7","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-up/-/find-up-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/find-up-2.1.0.tgz_1480684911017_0.33125952794216573"},"directories":{}}},"name":"find-up","time":{"modified":"2017-06-19T08:21:12.697Z","created":"2015-09-01T07:15:16.509Z","1.0.0":"2015-09-01T07:15:16.509Z","1.1.0":"2015-11-14T19:05:49.453Z","1.1.1":"2016-03-02T09:24:19.277Z","1.1.2":"2016-03-05T17:45:57.070Z","2.0.0":"2016-09-20T16:13:51.109Z","2.1.0":"2016-12-02T13:21:51.615Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/find-up#readme"}