{"id":14543097,"url":"https://github.com/lukeed/empathic","last_synced_at":"2025-10-09T18:24:20.584Z","repository":{"id":255442035,"uuid":"850810865","full_name":"lukeed/empathic","owner":"lukeed","description":"A set of small Node.js utilities to understand your pathing needs.","archived":false,"fork":false,"pushed_at":"2025-06-20T15:38:55.000Z","size":114,"stargazers_count":316,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-24T06:25:10.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukeed.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-01T20:55:18.000Z","updated_at":"2025-08-20T14:51:42.000Z","dependencies_parsed_at":"2025-06-20T03:27:51.054Z","dependency_job_id":"6d1a5212-ceaa-467a-9e02-119183f13b20","html_url":"https://github.com/lukeed/empathic","commit_stats":null,"previous_names":["lukeed/empathic"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lukeed/empathic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fempathic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fempathic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fempathic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fempathic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeed","download_url":"https://codeload.github.com/lukeed/empathic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fempathic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273436012,"owners_count":25105530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-06T01:00:42.955Z","updated_at":"2025-10-09T18:24:15.553Z","avatar_url":"https://github.com/lukeed.png","language":"TypeScript","readme":"# empathic [![CI](https://github.com/lukeed/empathic/workflows/CI/badge.svg)](https://github.com/lukeed/empathic/actions?query=workflow%3ACI) [![licenses](https://licenses.dev/b/npm/empathic)](https://licenses.dev/npm/empathic)\n\n\u003e 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 \u0026 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//=\u003e \"/.../path/to/acme/foobar.config.js\"\n\n// Find closest \"package.json\" file\nlet pkgfile = pkg.up({ cwd });\n//=\u003e \"/.../path/to/acme/package.json\"\n\n// Construct (optionally create) \"foobar\" cache dir\nlet cache = pkg.cache('foobar', { cwd, create: true });\n//=\u003e \"/.../path/to/acme/node_modules/.cache/foobar\"\n```\n\n## API\n\n### `empathic/access`\n\n\u003e [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\u003e [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\u003e [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\u003e [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\u003e [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","funding_links":[],"categories":["TypeScript","Utilities"],"sub_categories":["File System"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fempathic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeed%2Fempathic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fempathic/lists"}