{"_id":"find-file-up","_rev":"62892","name":"find-file-up","description":"Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:21:18.000Z","created":"2015-11-28T02:55:37.922Z","2.0.1":"2018-03-28T05:57:49.875Z","2.0.0":"2018-03-28T05:48:20.519Z","1.0.2":"2017-05-20T04:20:44.721Z","1.0.1":"2017-05-20T03:57:59.494Z","0.1.3":"2016-07-18T19:06:59.450Z","0.1.2":"2016-06-05T10:34:22.155Z","0.1.1":"2015-12-20T12:42:09.218Z","0.1.0":"2015-11-28T02:55:37.922Z"},"users":{"davidwells":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"versions":{"2.0.1":{"name":"find-file-up","description":"Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.","version":"2.0.1","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"pointnet","url":"https://github.com/pointnet"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=8"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^1.0.1"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.5.3","write":"^1.0.3"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-pkg","findup-sync","global-modules"]},"lint":{"reflinks":true}},"gitHead":"ce30edd1ae90a6dbf5ea0bf129a8d78d77b980e5","_id":"find-file-up@2.0.1","_npmVersion":"5.8.0","_nodeVersion":"9.9.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"4932dd81551af643893f8cda7453f221e3e28261","size":3399,"noattachment":false,"key":"/find-file-up/-/find-file-up-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-2.0.1.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-file-up_2.0.1_1522216669793_0.7901471280188657"},"_hasShrinkwrap":false,"publish_time":1522216669875,"_cnpm_publish_time":1522216669875},"2.0.0":{"name":"find-file-up","description":"Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.","version":"2.0.0","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"pointnet","url":"https://github.com/pointnet"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^1.0.1"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.5.3","write":"^1.0.3"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-pkg","findup-sync","global-modules"]},"lint":{"reflinks":true}},"gitHead":"5fa3200bd0e274001d10ab6550b67095bf46ba32","_id":"find-file-up@2.0.0","_npmVersion":"5.8.0","_nodeVersion":"9.9.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"3ecb4f7609967456207218a6f3f5d228a178604e","size":3400,"noattachment":false,"key":"/find-file-up/-/find-file-up-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-2.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-file-up_2.0.0_1522216100473_0.6235518073307753"},"_hasShrinkwrap":false,"publish_time":1522216100519,"_cnpm_publish_time":1522216100519},"1.0.2":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.","version":"1.0.2","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"pointnet","url":"https://github.com/pointnet"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^1.0.0"},"devDependencies":{"delete":"^1.0.1","gulp-format-md":"^0.1.12","mocha":"^3.4.1"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-pkg","findup-sync","global-modules","global-prefix","load-module-pkg","load-pkg"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"fedb272783ab1433cd318ddbd5685ce450396f2e","_id":"find-file-up@1.0.2","_shasum":"4d53664bc128cf793901497f4b13558d979755ca","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"4d53664bc128cf793901497f4b13558d979755ca","size":3270,"noattachment":false,"key":"/find-file-up/-/find-file-up-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-1.0.2.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-file-up-1.0.2.tgz_1495254043552_0.7236466086469591"},"directories":{},"publish_time":1495254044721,"_hasShrinkwrap":false,"_cnpm_publish_time":1495254044721},"1.0.1":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.","version":"1.0.1","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"pointnet","url":"https://github.com/pointnet"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^1.0.0"},"devDependencies":{"delete":"^1.0.1","gulp-format-md":"^0.1.12","mocha":"^3.4.1"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-pkg","findup-sync","global-modules","global-prefix","load-module-pkg","load-pkg"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"488ed042c537d6c4e12ed69124650cbbe751f635","_id":"find-file-up@1.0.1","_shasum":"dc71f3b7341b8bcf82e286200649fe09bc5835d8","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"dc71f3b7341b8bcf82e286200649fe09bc5835d8","size":3252,"noattachment":false,"key":"/find-file-up/-/find-file-up-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-1.0.1.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-file-up-1.0.1.tgz_1495252678559_0.9893683367408812"},"directories":{},"publish_time":1495252679494,"_hasShrinkwrap":false,"_cnpm_publish_time":1495252679494},"0.1.3":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js","LICENSE","README.md"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"fs-exists-sync":"^0.1.0","resolve-dir":"^0.1.0"},"devDependencies":{"delete":"^0.3.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-pkg","findup-sync","global-modules","global-prefix","load-module-pkg","load-pkg"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"72922ae6d81bce05bb39b98dc9e89702be0f2ec0","_id":"find-file-up@0.1.3","_shasum":"cf68091bcf9f300a40da411b37da5cce5a2fbea0","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"cf68091bcf9f300a40da411b37da5cce5a2fbea0","size":3133,"noattachment":false,"key":"/find-file-up/-/find-file-up-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-0.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/find-file-up-0.1.3.tgz_1468868818136_0.469717716332525"},"directories":{},"publish_time":1468868819450,"_cnpm_publish_time":1468868819450,"_hasShrinkwrap":false},"0.1.2":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"fs-exists-sync":"^0.1.0","resolve-dir":"^0.1.0"},"devDependencies":{"delete":"^0.3.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["file","find","up"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["load-module-pkg","load-pkg","findup-sync","find-pkg","global-prefix","global-modules"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"5f1616f45be2992e4892ecfce04285557e369883","_id":"find-file-up@0.1.2","_shasum":"15e6ce7eff177e9bb56db86a083a3ba630d48586","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"15e6ce7eff177e9bb56db86a083a3ba630d48586","size":2017,"noattachment":false,"key":"/find-file-up/-/find-file-up-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/find-file-up-0.1.2.tgz_1465122859639_0.6084597662556916"},"directories":{},"publish_time":1465122862155,"_cnpm_publish_time":1465122862155,"_hasShrinkwrap":false},"0.1.1":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^0.1.0","try-open":"^0.1.0"},"devDependencies":{"delete":"^0.2.1","mocha":"*"},"keywords":["file","find","up"],"verb":{"related":{"list":["load-module-pkg","load-pkg","look-up","module-root"]},"plugins":["gulp-format-md"]},"gitHead":"4b4a5912d77339fe5f46df4cfd564679c79dcf02","_id":"find-file-up@0.1.1","_shasum":"37a818848ae22edd6161224a034c12b20c648890","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"37a818848ae22edd6161224a034c12b20c648890","size":2670,"noattachment":false,"key":"/find-file-up/-/find-file-up-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-0.1.1.tgz"},"directories":{},"publish_time":1450615329218,"_cnpm_publish_time":1450615329218,"_hasShrinkwrap":false},"0.1.0":{"name":"find-file-up","description":"Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories).","version":"0.1.0","homepage":"https://github.com/jonschlinkert/find-file-up","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-file-up.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"resolve-dir":"^0.1.0"},"devDependencies":{"delete":"^0.2.1","mocha":"*"},"verb":{"related":{"list":["look-up","load-pkg","load-module-pkg","module-root"]}},"gitHead":"2c3a356794dcfbe1756995f87c13f18deca1253e","_id":"find-file-up@0.1.0","_shasum":"83e6ce7555b825e6705793731adee5adec6faaeb","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"83e6ce7555b825e6705793731adee5adec6faaeb","size":2542,"noattachment":false,"key":"/find-file-up/-/find-file-up-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-file-up/download/find-file-up-0.1.0.tgz"},"directories":{},"publish_time":1448679337922,"_cnpm_publish_time":1448679337922,"_hasShrinkwrap":false}},"readme":"# find-file-up [![NPM version](https://img.shields.io/npm/v/find-file-up.svg?style=flat)](https://www.npmjs.com/package/find-file-up) [![NPM monthly downloads](https://img.shields.io/npm/dm/find-file-up.svg?style=flat)](https://npmjs.org/package/find-file-up) [![NPM total downloads](https://img.shields.io/npm/dt/find-file-up.svg?style=flat)](https://npmjs.org/package/find-file-up) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/find-file-up.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/find-file-up)\n\n> Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.\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 find-file-up\n```\n\n## Usage\n\n```js\nconst find = require('find-file-up');\n```\n\n## async\n\n```js\nfind(filename, cwd, limit, callback);\n```\n\n**Example**\n\n* `filename` **String** - (required) the name of the file to find.\n* `cwd` **String** - (optional) the starting directory. This value can be prefixed with `~` to search from the user home directory.\n* `limit` **Number** - (optional) limit the number of directories to recurse.\n* `callback` **Functional** - (optional) A promise is returned when no callback is passed.\n\n**Promise example**\n\n```js\n// use \"~\" to search user home\nfind('foo.txt', '~/a/b/c')\n  .then(file => console.log(file)) //=> '/Users/jonschlinkert/foo.txt'\n  .catch(console.error);\n```\n\n**With async-await**\n\n```js\n(async function() {\n  const file = await find('foo.txt', '~/a/b/c');\n  console.log(file);\n  //=> '/Users/jonschlinkert/foo.txt'\n})();\n```\n\n**Callback example**\n\n```js\n// find `foo.txt` starting at the given directory\nfind('foo.txt', 'a/b/c', function(err, file) {\n  if (err) throw err;\n  console.log(file);\n  //=> /Users/jonschlinkert/dev/find-file-up/fixtures/foo.txt\n});\n```\n\n### sync\n\n```js\nfind.sync(filename, cwd, limit);\n```\n\n**Example**\n\n* `filename` **String** - (required) the name of the file to find.\n* `cwd` **String** - (optional) the starting directory.\n* `limit` **Number** - (optional) limit the number of directories to recurse.\n\n```js\nconst file = find.sync('foo.txt', 'a/b/c/');\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\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 && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\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 && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [find-pkg](https://www.npmjs.com/package/find-pkg): Find the first directory with a package.json, recursing up, starting with the given directory. Similar… [more](https://github.com/jonschlinkert/find-pkg) | [homepage](https://github.com/jonschlinkert/find-pkg \"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.\")\n* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/js-cli/node-findup-sync#readme) | [homepage](https://github.com/js-cli/node-findup-sync#readme \"Find the first file matching a given pattern in the current directory or the nearest ancestor directory.\")\n* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules \"The directory used by npm for globally installed npm modules.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 26 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 1 | [pointnet](https://github.com/pointnet) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/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.6.0, on March 28, 2018._","_attachments":{},"homepage":"https://github.com/jonschlinkert/find-file-up","bugs":{"url":"https://github.com/jonschlinkert/find-file-up/issues"},"license":"MIT"}