{"name":"walk-up-path","version":"3.0.0","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","ts-node":"^10.9.1","typedoc":"^0.23.28","typescript":"^5.0.2"},"dependencies":{"tap":"^16.3.4"},"gitHead":"adb4618d84bb4d977740978963ca34b5b749a90b","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.0","_nodeVersion":"18.14.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-TB/vxnml33kYXxOdw3SDVDF3ZRiYN5H95hyrdSpOZVNV66AD8isj9/4aaC39ofQrESPjjviz2DSY9kVkySyDtA==","shasum":"0605acd6143072e911460f26ea6332fadebd19fe","tarball":"http://registry-npm.ywwl.com/walk-up-path/download/walk-up-path-3.0.0.tgz","fileCount":13,"unpackedSize":6076,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUezFXu6qeJvlk2uMsZKaBdSJA7X5JehcQhohBA8SOaAiAZOy/OsjjLCXjZXH5PN100iVnXanW0Vg/XZlQS3DWzPw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkM0KtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMLA/+JNrDNmeMrcvhPS2B6aiL23Ht2tLm7VSSDlBNTcLlY/8WefJn\r\nrHiJamToOxy+a+AvYbD2jO+SJMurpaZMSxbBUk7Dyt2s8Rgz/c3LgyZJOYk/\r\nwKm6+LzcSEcWSGomLaBokp0iC1eYHppPs+bZIIGzfSIJ5Ymfui5daD4c9iRP\r\nhucNwqEZL/yeunX6/OsbLPsy7SblitPGzT2baJ6Z832ED5HSZ22c1xFnwwEE\r\nPk4Oa/HLGLnOm5q8i8mAXmtt1IXuXRyFmMoiUqD+SvwDYEeYG7OmWqhrpDnU\r\n/b22OGXE4DFVZ9rO38lu70de21LTDnN9Xj7cDOliQKeAkfmDyyeLyWDs1XiA\r\nNPYfjjklp2dAn1RD0lSMDZ3dGBE5WXtbpgYWim/UGL0sgsPDTGs9Ohmyl7Tm\r\nWSH+jNXx7Djx3M/D+PP5UXd0h9DuQnFOCAQ4f39IfE3xrMzBR4iIkTRledwg\r\nEudmSlevxWiHUImgWjn7KJibBVCYY0gezIiKtE5bnNh1VRJ2mwaVvLKRp3n4\r\nuaXpUIw4k7+JpftOjTBOeSi30DH8Xey9cXTPFFnwczUXF7TrVtoo0hy5kfpe\r\ngNEh3WSqM5hu7pBm+0HfE4FwH/CodTqhtp/cbli0Sq6EbpVOC9QGaxYO7ARO\r\nZC9vuhzA9E8rAxXcQREje46OpMbjQH5hFlc=\r\n=+n8r\r\n-----END PGP SIGNATURE-----\r\n","size":2496,"noattachment":false,"key":"/walk-up-path/-/walk-up-path-3.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_3.0.0_1681081005484_0.6097615954235422"},"_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":1681081005621,"_cnpm_publish_time":1681081005621,"dist-tags":{"latest":"4.0.0"}}