{"name":"walk-up-path","version":"2.0.0","main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{".":{"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.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","ts-node":"^10.9.1","typedoc":"^0.23.28","typescript":"^5.0.2"},"dependencies":{"tap":"^16.3.4"},"gitHead":"ae133dfb70b098d4f46af3f18ac4604ce5af37a1","bugs":{"url":"https://github.com/isaacs/walk-up-path/issues"},"homepage":"https://github.com/isaacs/walk-up-path#readme","_id":"walk-up-path@2.0.0","_nodeVersion":"18.14.0","_npmVersion":"9.6.3","dist":{"integrity":"sha512-kltM3Y87w+2X50IhyroHpmrWP+K3QKXvTfCY22fiShv+T0gM9gjtoSn+SNQqL1pG3Je5LNnuTYt+LdbTW+qyUw==","shasum":"d950d2ee4cf88a45da8ae38598273e69d7cdc267","tarball":"http://registry-npm.ywwl.com/walk-up-path/download/walk-up-path-2.0.0.tgz","fileCount":17,"unpackedSize":6980,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDECbmLkC8VqCoYvKbMlG2E+OVMvR6nIQMCxvijW1HTuwIhAM/zBUPTL+pMVNGZnlY3bKGw3lV72IEhoUrR4bhRALqN"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkLfOoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4GA/+MxnwcHs4aGr5uINv3KkPOpAB9h/Pd3iROQB8sjrwzTNjqFEn\r\nesdF97hCEY1gq1f88jCvrjWTTXTeuVJL6YV2NvJrVFJqxqWcyB3Q9EYJ0c7r\r\nlAw2cm7BowtvUNUqVvBAVdDRLEnltYo7AwGiRjxjVzq4JnP8WqNtfRfEAmPU\r\nFtnUQ2QwdKr4yuLOJB3iZotK1LJkqQJYZQ0l9tNK2HNb2gSY1YYsX54RFU78\r\nyXsZYu0EaX152Pb7okCCY+IX3/AEbahpY8u74mXKGBpWQ/7UEGhuzkcJ+ttA\r\nZ1xdBP/gN7GZ1NrnrmtGEwp32tM9YRAwAhjbcbOMtwOFhfCGci+gr2OlKCWL\r\nC5OV+baq+hgHNTrklqas9CLiAzTXX7Xhqj5UXJTp1NSfjtLO3GvvBDM/DVqM\r\n3Y2pPBYVKSw4115uxCoikidxifgt3x0DgMTi3+3im1y2PK7wiNEtST6ft64Q\r\nYysx2dvmG15Wq4nepEA1CtXXPmjrd1qSlSeybQjxBROpPRPqQgsXIjNpJjuE\r\njqid+bH9kWHrv9APJWtUTGT1KrnhMb7UFf95fbbznaF/iFePMoOMqhMMKEAi\r\nLmdgQ7rETxc9LAGEV/v7LBd9DZviAsKOUfM4mISR0OWraYMjGGA+aTtOnc3z\r\n+HgHKSyAsOr57RVSxVM/22WvKBEzNUbpszI=\r\n=VLDI\r\n-----END PGP SIGNATURE-----\r\n","size":2862,"noattachment":false,"key":"/walk-up-path/-/walk-up-path-2.0.0.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_2.0.0_1680733096740_0.03990861087190645"},"_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":1680733096886,"_cnpm_publish_time":1680733096886,"dist-tags":{"latest":"4.0.0"}}