{"_id":"find-up-simple","_rev":"3818753","name":"find-up-simple","description":"Find a file or directory by walking up parent directories — Zero dependencies","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2025-06-11T09:57:07.000Z","created":"2023-11-03T19:46:39.421Z","1.0.1":"2025-03-01T09:15:33.098Z","1.0.0":"2023-11-03T19:46:39.421Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up-simple.git"},"versions":{"1.0.1":{"name":"find-up-simple","version":"1.0.1","description":"Find a file or directory by walking up parent directories — Zero dependencies","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up-simple.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava"},"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","walk","walking","path"],"devDependencies":{"ava":"^5.3.1","tempy":"^3.1.0","xo":"^0.56.0"},"_id":"find-up-simple@1.0.1","gitHead":"60c30854c429c877284ef9a256d226bd8ada14d8","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/find-up-simple/issues"},"homepage":"https://github.com/sindresorhus/find-up-simple#readme","_nodeVersion":"23.6.1","_npmVersion":"10.9.2","dist":{"shasum":"18fb90ad49e45252c4d7fca56baade04fa3fca1e","size":2645,"noattachment":false,"key":"/find-up-simple/-/find-up-simple-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-up-simple/download/find-up-simple-1.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/find-up-simple_1.0.1_1740820532887_0.9104427377264521"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-03-01T09:15:33.098Z","publish_time":1740820533098,"_source_registry_name":"default","_cnpm_publish_time":1740820533098},"1.0.0":{"name":"find-up-simple","version":"1.0.0","description":"Find a file or directory by walking up parent directories — Zero dependencies","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/find-up-simple.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava"},"keywords":["find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","walk","walking","path"],"devDependencies":{"ava":"^5.3.1","tempy":"^3.1.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"f9967939d9c25c9fc5170eb10e118338b742826a","bugs":{"url":"https://github.com/sindresorhus/find-up-simple/issues"},"homepage":"https://github.com/sindresorhus/find-up-simple#readme","_id":"find-up-simple@1.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"shasum":"21d035fde9fdbd56c8f4d2f63f32fd93a1cfc368","size":2604,"noattachment":false,"key":"/find-up-simple/-/find-up-simple-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-up-simple/download/find-up-simple-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-up-simple_1.0.0_1699040799243_0.18839061838954585"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-03T19:46:39.421Z","publish_time":1699040799421,"_source_registry_name":"default","_cnpm_publish_time":1699040799421}},"readme":"# find-up-simple\n\n> Find a file or directory by walking up parent directories\n\nThis is a simpler version of my [`find-up`](https://github.com/sindresorhus/find-up) package, now with zero dependencies.\n\n## Install\n\n```sh\nnpm install find-up-simple\n```\n\n## Usage\n\n```\n/\n└── Users\n    └── sindresorhus\n        ├── unicorn.png\n        └── foo\n            └── bar\n                ├── baz\n                └── example.js\n```\n\n`example.js`\n\n```js\nimport {findUp} from 'find-up-simple';\n\nconsole.log(await findUp('unicorn.png'));\n//=> '/Users/sindresorhus/unicorn.png'\n```\n\n## API\n\n### findUp(name, options?)\n\nReturns a `Promise` for the found path or `undefined` if it could not be found.\n\n### findUpSync(name, options?)\n\nReturns the found path or `undefined` if it could not be found.\n\n#### name\n\nType: `string`\n\nThe name of the file or directory to find.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `URL | string`\\\nDefault: `process.cwd()`\n\nThe directory to start from.\n\n##### type\n\nType: `string`\\\nDefault: `'file'`\\\nValues: `'file' | 'directory'`\n\nThe type of path to match.\n\n##### stopAt\n\nType: `URL | string`\\\nDefault: Root directory\n\nThe last directory to search before stopping.\n\n## FAQ\n\n### How is it different from [`find-up`](https://github.com/sindresorhus/find-up)?\n\n- No support for multiple input names\n- No support for finding multiple paths\n- No custom matching\n- No symlink option\n- Zero dependencies\n\n## Related\n\n- [find-up](https://github.com/sindresorhus/find-up) - A more advanced version of this package\n- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module\n- [package-up](https://github.com/sindresorhus/package-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","_attachments":{},"homepage":"https://github.com/sindresorhus/find-up-simple#readme","bugs":{"url":"https://github.com/sindresorhus/find-up-simple/issues"},"license":"MIT"}