1 line
18 KiB
Plaintext
1 line
18 KiB
Plaintext
{"_id":"empathic","_rev":"8-8de942ab5b173ad3849e64d83a1c7b3e","name":"empathic","dist-tags":{"latest":"2.0.0","next":"2.0.0-next.0"},"versions":{"0.0.0":{"name":"empathic","version":"0.0.0","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@0.0.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"3b033ccfc81fdda7aca0cda848aefa7e2ab35fc7","tarball":"https://registry.npmjs.org/empathic/-/empathic-0.0.0.tgz","fileCount":3,"integrity":"sha512-aNHJui3qtUYh23gVj8q2zs6OMkGD5MRlJH4wyPyIMe0ZytZV7x/ATS4fM5+hxIAmmAfMBlTm6u4zVs3lgtS8fg==","signatures":[{"sig":"MEYCIQCox/SFRRfB+mQY9nNeKWVEBKjXMH16uOg5nU4hqTglyQIhAJX5kVmnuzWQKVuAJ3WkBIg/mXBTS0+jzFBlkFSR/cbv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1907},"engines":{"node":">=18"},"exports":{"./package.json":"./package.json"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.2.3","description":"A set of small utilities to understand your Node.js pathing needs","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/empathic_0.0.0_1724972777477_0.6012889420071581","host":"s3://npm-registry-packages"}},"0.0.1":{"name":"empathic","version":"0.0.1","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@0.0.1","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"378b69888be3e866f952fb2cfbf50417066fd395","tarball":"https://registry.npmjs.org/empathic/-/empathic-0.0.1.tgz","fileCount":12,"integrity":"sha512-lZajSDoRHXWrHh+vcqbWa76IaW5pvgOKGm3epxHi1W6MvY/mqJ++TDnemnOngvHna3s7Rr2VZyUbQieLVpxBPw==","signatures":[{"sig":"MEYCIQCMGGEUHE0BiOhPP0kqUU7GpTSH1C8FV4U7aQ3KJz3ScgIhAIe0lcQbq69vuAYANP8tZfLCI2PwML/QH3w5XE/sj1cE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6036},"engines":{"node":">=18"},"exports":{"./find":{"types":"./find.d.mts","import":"./find.mjs"},"./walk":{"types":"./walk.d.mts","import":"./walk.mjs"},"./access":{"types":"./access.d.mts","import":"./access.mjs"},"./package":{"types":"./package.d.mts","import":"./package.mjs"},"./resolve":{"types":"./resolve.d.mts","import":"./resolve.mjs"},"./package.json":"./package.json"},"gitHead":"3d7dfa1fd8538f457e337218427f3321e25dd155","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.2.3","description":"A set of small Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/empathic_0.0.1_1725265926150_0.061977561500944356","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"empathic","version":"0.0.2","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@0.0.2","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"7fd2f5ab332ecced60ebe7c6afc9dbf190b72a40","tarball":"https://registry.npmjs.org/empathic/-/empathic-0.0.2.tgz","fileCount":13,"integrity":"sha512-DdmHHUWjRe54UgCcKsoac7XwhPzRYn2TKipdvXnaT1k/roHrWm9FnfPjjRm5bhFww+MAsfiuu7N92S11TJy+6Q==","signatures":[{"sig":"MEYCIQD+W/uL+NcweRo7tmn8NoveXdDvGV7pxTX16KbR/Dw0RAIhAMnCDpZREjpKEMkJ2k45ssnQNxTHj2j68OdY5AldwtP8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8411},"engines":{"node":">=18"},"exports":{"./find":{"types":"./find.d.mts","import":"./find.mjs"},"./walk":{"types":"./walk.d.mts","import":"./walk.mjs"},"./access":{"types":"./access.d.mts","import":"./access.mjs"},"./package":{"types":"./package.d.mts","import":"./package.mjs"},"./resolve":{"types":"./resolve.d.mts","import":"./resolve.mjs"},"./package.json":"./package.json"},"gitHead":"efc67f9c7fc5d2b0a6d748eeabc8a45d35c0a799","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.8.2","description":"A set of small and fast Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/empathic_0.0.2_1725309699851_0.6100161938200224","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"empathic","version":"0.0.3","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@0.0.3","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"d57f12c5feba0adda787144508f2e93d14759b4c","tarball":"https://registry.npmjs.org/empathic/-/empathic-0.0.3.tgz","fileCount":13,"integrity":"sha512-fXt4uveg3rZ2+H/tQBDz5oSVbGBJ92c/j1VzlQ+y0QoGYqMblEiqqtnzYOrVHS4BdV7a1u2wZKJEwS6v55MZsA==","signatures":[{"sig":"MEQCIClnVga7KOIwZcMCQ/j+Nvb4FhMVulztq59IqGg5SwQ5AiAF6r2GXwacfDETFrN9/ciNfE7UIiSEP/FYmCwE6ppNnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8486},"engines":{"node":">=16"},"exports":{"./find":{"types":"./find.d.mts","import":"./find.mjs"},"./walk":{"types":"./walk.d.mts","import":"./walk.mjs"},"./access":{"types":"./access.d.mts","import":"./access.mjs"},"./package":{"types":"./package.d.mts","import":"./package.mjs"},"./resolve":{"types":"./resolve.d.mts","import":"./resolve.mjs"},"./package.json":"./package.json"},"gitHead":"890eb310ca0e01543fdd92e35495129a3939dd35","scripts":{"test":"uvu"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.8.2","description":"A set of small and fast Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5"},"_npmOperationalInternal":{"tmp":"tmp/empathic_0.0.3_1725375132293_0.1109377836342651","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"empathic","version":"1.0.0","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@1.0.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"4a1faf607804e30d9ebbbee12a1d51180cad5956","tarball":"https://registry.npmjs.org/empathic/-/empathic-1.0.0.tgz","fileCount":13,"integrity":"sha512-qtKgI1Mv8rTacvpaTkh28HM2Lbf+IOjXb7rhpt/42kZxRm8TBb/IVlo5iL2ztT19kc/EHAFN0fZ641avlXAgdg==","signatures":[{"sig":"MEQCICK4xFvbL1UfQAvnx/oWuQ6C17jNsRJA/WplA2/17gqdAiA/j8h3Qur/ZVfb618sEo/AQIimozFC0e0yXrIDz0Ez9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8486},"engines":{"node":">=16"},"exports":{"./find":{"types":"./find.d.mts","import":"./find.mjs"},"./walk":{"types":"./walk.d.mts","import":"./walk.mjs"},"./access":{"types":"./access.d.mts","import":"./access.mjs"},"./package":{"types":"./package.d.mts","import":"./package.mjs"},"./resolve":{"types":"./resolve.d.mts","import":"./resolve.mjs"},"./package.json":"./package.json"},"gitHead":"ef8518e6cafe166c27d6750994fa8b632bdbb88a","scripts":{"test":"uvu"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.8.2","description":"A set of small and fast Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5"},"_npmOperationalInternal":{"tmp":"tmp/empathic_1.0.0_1725399020736_0.37123809944653274","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"empathic","version":"1.1.0","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@1.1.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"a0de7dcaab07695bcab54117116d44c92b89e79f","tarball":"https://registry.npmjs.org/empathic/-/empathic-1.1.0.tgz","fileCount":18,"integrity":"sha512-rsPft6CK3eHtrlp9Y5ALBb+hfK+DWnA4WFebbazxjWyx8vSm3rZeoM3z9irsjcqO3PYRzlfv27XIB4tz2DV7RA==","signatures":[{"sig":"MEYCIQDnvPbfatvstN5SdMpHzP80zj7+tPdmUoBXWYQDoQ+wQgIhAOAgkVAQ1d+Hq1vVk+911+ZTTpsahtzpxEPdh1SRPCzg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17935},"engines":{"node":">=14"},"exports":{"./find":{"types":"./find.d.ts","import":"./find.mjs","require":"./find.js"},"./walk":{"types":"./walk.d.ts","import":"./walk.mjs","require":"./walk.js"},"./access":{"types":"./access.d.ts","import":"./access.mjs","require":"./access.js"},"./package":{"types":"./package.d.ts","import":"./package.mjs","require":"./package.js"},"./resolve":{"types":"./resolve.d.ts","import":"./resolve.mjs","require":"./resolve.js"},"./package.json":"./package.json"},"gitHead":"0dc2c39e1fdd6b5a833bd240634e86af9cc4f9ce","scripts":{"test":"uvu"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.8.2","description":"A set of small and fast Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5"},"_npmOperationalInternal":{"tmp":"tmp/empathic_1.1.0_1745951509161_0.7944967738730184","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-next.0":{"name":"empathic","version":"2.0.0-next.0","author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"empathic@2.0.0-next.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/empathic#readme","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"dist":{"shasum":"f1ff694fc777a4f2d4b0846c889b0113bd49cf3f","tarball":"https://registry.npmjs.org/empathic/-/empathic-2.0.0-next.0.tgz","fileCount":18,"integrity":"sha512-CiAejfUadseuCFVDwhWRHQnZFOQZdprmh5Jj+airYs2PP//ZKvOcbkTgzK9tD9VJi5mgIC8ck6aY4u9NLDFOZA==","signatures":[{"sig":"MEUCIBBEx32eDuo8PzGa/5pNiXQSTBl4wYR05gr8CJCYuY/HAiEAu6GoJpe/BTkr4uX9Ra4oTT6Qdu4Mc6MveipLREkN82M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@2.0.0-next.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21229},"engines":{"node":">=14"},"exports":{"./find":{"types":"./find.d.ts","import":"./find.mjs","require":"./find.js"},"./walk":{"types":"./walk.d.ts","import":"./walk.mjs","require":"./walk.js"},"./access":{"types":"./access.d.ts","import":"./access.mjs","require":"./access.js"},"./package":{"types":"./package.d.ts","import":"./package.mjs","require":"./package.js"},"./resolve":{"types":"./resolve.d.ts","import":"./resolve.mjs","require":"./resolve.js"},"./package.json":"./package.json"},"gitHead":"535b41e7fd1702debdc5431c72a9badfa0e24901","scripts":{"test":"uvu"},"_npmUser":{"name":"lukeed","actor":{"name":"lukeed","type":"user","email":"luke@lukeed.com"},"email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/empathic.git","type":"git"},"_npmVersion":"10.8.2","description":"A set of small and fast Node.js utilities to understand your pathing needs.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"uvu":"0.5"},"_npmOperationalInternal":{"tmp":"tmp/empathic_2.0.0-next.0_1750395870569_0.40828485749651455","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"empathic","version":"2.0.0","repository":{"type":"git","url":"git+https://github.com/lukeed/empathic.git"},"description":"A set of small and fast Node.js utilities to understand your pathing needs.","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"exports":{"./access":{"types":"./access.d.ts","import":"./access.mjs","require":"./access.js"},"./find":{"types":"./find.d.ts","import":"./find.mjs","require":"./find.js"},"./package":{"types":"./package.d.ts","import":"./package.mjs","require":"./package.js"},"./resolve":{"types":"./resolve.d.ts","import":"./resolve.mjs","require":"./resolve.js"},"./walk":{"types":"./walk.d.ts","import":"./walk.mjs","require":"./walk.js"},"./package.json":"./package.json"},"scripts":{"test":"uvu"},"engines":{"node":">=14"},"devDependencies":{"uvu":"0.5"},"_id":"empathic@2.0.0","gitHead":"f5f944a06f9a411168a0073c3fe14e517031d098","bugs":{"url":"https://github.com/lukeed/empathic/issues"},"homepage":"https://github.com/lukeed/empathic#readme","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==","shasum":"71d3c2b94fad49532ef98a6c34be0386659f6131","tarball":"https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz","fileCount":18,"unpackedSize":21222,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/empathic@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6nReTwcxOr5MFWIWTwCsQ+pefBBEbOoA7FmI1Z7KubgIgCmo7PJoT+voL+fLKs3Cb0nKGy0NJdw+548oAEEj+4CA="}]},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com","actor":{"name":"lukeed","email":"luke@lukeed.com","type":"user"}},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/empathic_2.0.0_1750433965816_0.8345549636911278"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-29T23:06:17.476Z","modified":"2025-06-20T15:39:26.399Z","0.0.0":"2024-08-29T23:06:17.610Z","0.0.1":"2024-09-02T08:32:06.322Z","0.0.2":"2024-09-02T20:41:40.019Z","0.0.3":"2024-09-03T14:52:12.479Z","1.0.0":"2024-09-03T21:30:20.866Z","1.1.0":"2025-04-29T18:31:49.346Z","2.0.0-next.0":"2025-06-20T05:04:30.746Z","2.0.0":"2025-06-20T15:39:26.009Z"},"bugs":{"url":"https://github.com/lukeed/empathic/issues"},"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"license":"MIT","homepage":"https://github.com/lukeed/empathic#readme","repository":{"type":"git","url":"git+https://github.com/lukeed/empathic.git"},"description":"A set of small and fast Node.js utilities to understand your pathing needs.","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"readme":"# empathic [](https://github.com/lukeed/empathic/actions?query=workflow%3ACI) [](https://licenses.dev/npm/empathic)\n\n> A set of small and [fast](/benchmarks.md) Node.js utilities to understand your pathing needs.\n\nMultiple submodules (eg, `empathic/find`) are offered, _each of which_ are:\n\n* **fast** — 8x to 40x faster than popular alternatives\n* **modern** — based on newer `node:*` native APIs\n* **small** — ranging from 200b to 500b in size\n* **safe** — zero-dependency & easy to read\n\n## Install\n\n```sh\n$ npm install empathic\n```\n\n## Usage\n\n```ts\nimport { resolve } from 'node:path';\nimport * as find from 'empathic/find';\nimport * as pkg from 'empathic/package';\n\n// Assumed example structure:\nlet cwd = resolve('path/to/acme/websites/dashboard');\n\n// Find closest \"foobar.config.js\" file\nlet file = find.up('foobar.config.js', { cwd });\n//=> \"/.../path/to/acme/foobar.config.js\"\n\n// Find closest \"package.json\" file\nlet pkgfile = pkg.up({ cwd });\n//=> \"/.../path/to/acme/package.json\"\n\n// Construct (optionally create) \"foobar\" cache dir\nlet cache = pkg.cache('foobar', { cwd, create: true });\n//=> \"/.../path/to/acme/node_modules/.cache/foobar\"\n```\n\n## API\n\n### `empathic/access`\n\n> [Source](/src/access.ts) · **Size:** `259b`\n\nCheck for file access/permissions. Named [`fs.accessSync`](https://nodejs.org/docs/latest/api/fs.html#fsaccesssyncpath-mode) shortcuts.\n\n### `empathic/find`\n\n> [Source](/src/find.ts) · [Benchmark](/benchmarks.md#find) · **Size:** `569b`\n\nFind files and/or directories by walking up parent directories.\n\n### `empathic/package`\n\n> [Source](/src/package.ts) · [Benchmark](/benchmarks.md#package) · **Size:** `505b`\n\nConvenience helpers for dealing with `package.json` files and/or `node_modules` packages.\n\n### `empathic/resolve`\n\n> [Source](/src/resolve.ts) · [Benchmark](/benchmarks.md#resolve) · **Size:** `419b`\n\nResolve absolute paths to package identifiers, relative paths, file URL, and/or from other root directories.\n\n### `empathic/walk`\n\n> [Source](/src/walk.ts) · [Benchmark](/benchmarks.md#walk) · **Size:** `208b`\n\nCollect all the parent directories of a target. Controlled via `cwd` and `last` options.\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","readmeFilename":"readme.md"} |