{"name":"walk-up-path","version":"1.0.0","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":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"tap":{"check-coverage":true},"devDependencies":{"tap":"^14.10.7","require-inject":"^1.4.4"},"gitHead":"09978d8c889823988f11f583c9b0f22bf4b66381","bugs":{"url":"https://github.com/isaacs/walk-up-path/issues"},"homepage":"https://github.com/isaacs/walk-up-path#readme","_id":"walk-up-path@1.0.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==","shasum":"d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e","tarball":"http://registry-npm.ywwl.com/walk-up-path/download/walk-up-path-1.0.0.tgz","fileCount":4,"unpackedSize":2350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyujGCRA9TVsSAnZWagAASg8P/AmgGq8OB6bm2uage1O7\njvERK2Qm2h5TSIStWCZkr2Vo8x5cmBJqHvekPX5ddjoJCu04PERg586phE2w\nMD9bceaXza31sJZNe/EN0/Ee1LV6/ssOj6puaRlqgCcJwdPndTjunvEE6UNN\nc5va5JwRUPS39qSI13TLEgCCft3R6mbsH34MpVDAKJ6IpnP+rjeq0irY26cT\nid91g6/wiqUKnGl2whjhGOfAoQOFKwx3zlC3wmTSkbYFd4xHchn3DQR2JumD\nXeTWPpYTdbflGC/853BF4VLG3yuuulOcCpFLB1A1/p6jhh/FCYEvOHX0PO2G\nLDcMLG2SkgLEdv40Thj1h31DvD5tw0Sp+ZMcherMeCz4S/GQVXfZvTkiZ8vV\nFRm0qHVHql5FTr7/kgL3l9vytiizKGgiNkH//80sBVmpV4zNklVOe4oDCAEr\nP2T4njbjBrSgggkUluauxFWTqe19ta1EWKiEdSgtN9j49rCnrllGp2avYzd7\nD+muUkMljJBB8qzt/hSb6zfQmjNx9AH/fmhgM07YGhPW3V0d9khJGM9lL/Dv\n64WshFWDLVtxUoYDFXACQ5MITEnKmWLla8gkz8c/DEpURyihNnEjKfRFf4vw\nyHbrqdhOUOBM8qmkqhTZtqU/O8DUPeac56NzWyN25y2gIrUK3BpsPOrUIKm8\ntwvb\r\n=boJp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeULVgd6Fm2tDH8qQDRediPazMR8RzAp8ZDJOD+5JP7QIhAOepe2ZxRBvTWRFS1UW/QpVndjiEai2lklfethZM39Mw"}],"size":1381,"noattachment":false,"key":"/walk-up-path/-/walk-up-path-1.0.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/walk-up-path_1.0.0_1590356166014_0.1994914696104697"},"_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":1590356166164,"_cnpm_publish_time":1590356166164,"dist-tags":{"latest":"4.0.0"}}