{"name":"walk-up-path","version":"3.0.1","main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{".":{"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"},"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"}}},"description":"Given a path string, return a generator that walks up the path, emitting each dirname.","repository":{"type":"git","url":"git+https://github.com/isaacs/walk-up-path.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","format":"prettier --write . --loglevel warn","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts"},"prettier":{"semi":false,"printWidth":75,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--no-warnings","--loader","ts-node/esm"],"ts":false},"devDependencies":{"@types/node":"^18.15.5","@types/tap":"^15.0.8","c8":"^7.13.0","eslint-config-prettier":"^8.8.0","prettier":"^2.8.6","tap":"^16.3.4","ts-node":"^10.9.1","typedoc":"^0.23.28","typescript":"^5.0.2"},"gitHead":"b79594a6a28a8809960673d6a6e9ae78b4c12309","bugs":{"url":"https://github.com/isaacs/walk-up-path/issues"},"homepage":"https://github.com/isaacs/walk-up-path#readme","_id":"walk-up-path@3.0.1","_nodeVersion":"18.14.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==","shasum":"c8d78d5375b4966c717eb17ada73dbd41490e886","tarball":"http://registry-npm.ywwl.com/walk-up-path/download/walk-up-path-3.0.1.tgz","fileCount":13,"unpackedSize":6052,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHBH3LPIgja3ohJ9gD3n4iQZEmXu9yLYG8QfItEOLseAiEAusHwvgCKUikuQKRO1RXQjv2eTbZEO8rHfBz2z5XIzI4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkM6YhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCCw//fNL6Zk/c3BVQ9puMeHDy7+UuH7Muh/LP8KFYKu/N+SEXDANR\r\nAUk5+N/i72FR7ErUruuVnKvAgdp6paEizCykaDwPNB9RnTSJRF9uvS9LlSfy\r\ntgDWeOgc3c3VguKr3QrNLIugib2wk5ugAIZ41gTFdgkXmZpCRtgWsUCaGxQR\r\nL7FxOZr04Gr9uh5SE4tR+9qiQwW9ysCF1KqJDOZ3TtU4YUPQEJKzKyKPHaF2\r\nYTwVXwCytw5D+hP/kxFpULKQSyoLAq9I4XJVQiO8fEyvORAJi8sPk02kETxE\r\nPwmRqnxWZI7IrdnAAWEX3uQIeH3VmiW9WiCY934Mrn67ObKs5pCgjZwIJpEw\r\nMxlmfUaQ+9KGwBoXsJWuszaKRbkCyHMpmPlgSUAmRdhjJjvM2opD+yWTMqxI\r\nqxLyyTDv6xnn/f5IQOy5MVEpcIqk2NxFOgXZyb8cPT5VxNXGIswORfYajite\r\ngKprCclMG0PB4vuWZ3svXtIlzmhJM8nDhsnYVwxJc4Y7bvBhJloQrBnkH8d/\r\n+27nmzdVvIwPpyQ4r+CnbJDRFRhaqaoLlOhe9JqByqkw/2JLQaGQ7R7GwRAB\r\nhzl3YQk17sWXcLPjQf6LityjBK/G64LsFo43LNwkkK8iQWHjpjJ5/RwYmQGe\r\nf+D+REgEEv8XOtcrrG0KLCBPaUUy/wBv/cI=\r\n=Jh0y\r\n-----END PGP SIGNATURE-----\r\n","size":2492,"noattachment":false,"key":"/walk-up-path/-/walk-up-path-3.0.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/walk-up-path_3.0.1_1681106464889_0.17352355251426066"},"_hasShrinkwrap":false,"readme":"# walk-up-path\n\nGiven a path string, return a generator that walks up the path, emitting\neach dirname.\n\nSo, to get a platform-portable walk up, instead of doing something like\nthis:\n\n```js\nfor (let p = dirname(path); p;) {\n\n  // ... do stuff ...\n\n  const pp = dirname(p)\n  if (p === pp)\n    p = null\n  else\n    p = pp\n}\n```\n\nOr this:\n\n```js\nfor (let p = dirname(path); !isRoot(p); p = dirname(p)) {\n  // ... do stuff ...\n}\n```\n\nYou can do this:\n\n```js\nconst walkUpPath = require('walk-up-path')\nfor (const p of walkUpPath(path)) {\n  // ... do stuff ..\n}\n```\n\n## API\n\n```js\nconst walkUpPath = require('walk-up-path')\n```\n\nGive the fn a string, it'll yield all the directories walking up to the\nroot.\n","publish_time":1681106465040,"_cnpm_publish_time":1681106465040,"dist-tags":{"latest":"4.0.0"}}