{"id":16682556,"url":"https://github.com/jchip/node-module-dir","last_synced_at":"2026-04-16T14:36:06.378Z","repository":{"id":66137369,"uuid":"360248659","full_name":"jchip/node-module-dir","owner":"jchip","description":"Find the top dir of a package in node_modules","archived":false,"fork":false,"pushed_at":"2021-04-21T21:55:30.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T20:01:33.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jchip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-04-21T17:12:54.000Z","updated_at":"2021-04-21T21:55:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c0aa013-d4d1-4bab-b7e1-6b3ceb2f0bc2","html_url":"https://github.com/jchip/node-module-dir","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"612be806c2a61e2f1d585496fe248b572af458a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fnode-module-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fnode-module-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fnode-module-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchip%2Fnode-module-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jchip","download_url":"https://codeload.github.com/jchip/node-module-dir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243392326,"owners_count":20283565,"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","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-10-12T14:07:53.876Z","updated_at":"2025-12-28T14:25:32.257Z","avatar_url":"https://github.com/jchip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-module-dir\n\nFind the top dir of a package in `node_modules` by looking for the first dir\nthat contains `package.json` file. The search stops when it reaches the dir\n`node_modules`.\n\nNormally this is just `Path.dirname(require.resolve(name + \"/package.json\"))`, but\nnew node.js and `package.json` ES module export blocks requiring `package.json`.\n\n```js\nconst { findNodeModuleDir } = require(\"node-module-dir\");\n\nconst dir = findNodeModuleDir(\"package-name\");\n```\n\n# License\n\nLicensed under the [Apache License, Version 2.0]\n\n[apache license, version 2.0]: https://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fnode-module-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjchip%2Fnode-module-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchip%2Fnode-module-dir/lists"}