{"name":"walk-back","author":{"name":"Lloyd Brookes","email":"opensource@75lb.com"},"version":"5.1.2","description":"Walk up the directory tree until the specified path is found.","repository":{"type":"git","url":"git+https://github.com/75lb/walk-back.git"},"license":"MIT","type":"module","exports":{"import":"./index.js","require":"./dist/index.cjs"},"keywords":["walk","up","back","filesystem","fs","find","file","search","system","config"],"engines":{"node":">=12.17"},"scripts":{"test":"npm run dist && npm run test:ci","test:ci":"75lb-nature test-runner test/test.js test/test.cjs","docs":"75lb-nature jsdoc2md -t README.hbs index.js > README.md","dist":"75lb-nature cjs-build index.js"},"devDependencies":{},"peerDependencies":{"@75lb/nature":"latest"},"peerDependenciesMeta":{"@75lb/nature":{"optional":true}},"gitHead":"dabfa0a757a6eff1b6779e753a93898c485668e7","_id":"walk-back@5.1.2","bugs":{"url":"https://github.com/75lb/walk-back/issues"},"homepage":"https://github.com/75lb/walk-back#readme","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-uCgzIY1U7fyXvJm+mesY0xjf2HXu7mtTnptONwVQ11ur1JhMrUyQJn2fDje1CGFQDnTFTo1Slr1vRuvUS9PYoQ==","shasum":"e8bef424a21476aa513363dec2898b49cd8a2372","tarball":"http://registry-npm.ywwl.com/walk-back/download/walk-back-5.1.2.tgz","fileCount":6,"unpackedSize":8516,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFgU65mb5qyeza4qlVoWl4C1ujCqRO/Yi8XF70b+TbmcAiASUgRSR2ozPUFQH9ZnIif76kufctmXr67lcqb4ohfzig=="}],"size":2506,"noattachment":false,"key":"/walk-back/-/walk-back-5.1.2.tgz"},"_npmUser":{"name":"75lb","email":"opensource@75lb.com"},"directories":{},"maintainers":[{"name":"75lb","email":"opensource@75lb.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/walk-back_5.1.2_1772890653912_0.760314809119911"},"_hasShrinkwrap":false,"readme":"[![view on npm](https://badgen.net/npm/v/walk-back)](https://www.npmjs.org/package/walk-back)\n[![npm module downloads](https://badgen.net/npm/dt/walk-back)](https://www.npmjs.org/package/walk-back)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/walk-back)](https://github.com/75lb/walk-back/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/walk-back)](https://github.com/75lb/walk-back/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/walk-back/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/walk-back/actions/workflows/node.js.yml)\n\n<a name=\"module_walk-back\"></a>\n\n## walk-back\nWalk up the directory tree until the specified path is found. For example, starting from the current directory, you might want to walk up the directory tree until a specified config file is found.\n\n**Example**  \n```js\nimport walkBack from 'walk-back'\n```\n<a name=\"exp_module_walk-back--walkBack\"></a>\n\n### walkBack(startAt, lookingFor) ⇒ <code>string</code> ⏏\nReturns an absolute file path (if found) else `null`.\n\n**Kind**: Exported function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| startAt | <code>string</code> | the directory to start in |\n| lookingFor | <code>string</code> | the path we're looking for |\n\n**Example**  \n```js\n> walkBack('/Users/lloyd/Documents/75lb/walk-back', 'package.json')\n'/Users/lloyd/Documents/75lb/walk-back/package.json'\n\n> walkBack('/Users/lloyd/Documents/75lb/walk-back', '75lb')\n'/Users/lloyd/Documents/75lb'\n\n> walkBack('/Users/lloyd/Documents/75lb/walk-back', '.bash_profile')\n'/Users/lloyd/.bash_profile'\n\n> walkBack('.', '.bash_profile')\n'/Users/lloyd/.bash_profile'\n\n> walkBack('/Users/lloyd/Documents/75lb/walk-back', 'non-existent.file')\nnull\n```\n\n* * *\n\n&copy; 2015-26 Lloyd Brookes \\<opensource@75lb.com\\>.\n\nTested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1772890654052,"_cnpm_publish_time":1772890654052,"dist-tags":{"latest":"5.1.2"}}