{"id":23711222,"url":"https://github.com/gabts/node-modules-license-crawler","last_synced_at":"2025-08-12T13:07:55.130Z","repository":{"id":143897890,"uuid":"304717637","full_name":"gabts/node-modules-license-crawler","owner":"gabts","description":"Crawl dependency licenses from node_modules","archived":false,"fork":false,"pushed_at":"2020-11-10T13:39:41.000Z","size":11,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T00:23:49.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/node-modules-license-crawler","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/gabts.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}},"created_at":"2020-10-16T19:12:15.000Z","updated_at":"2023-03-30T08:51:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"2befa2b7-dec5-4c8c-9d55-fa6844876bae","html_url":"https://github.com/gabts/node-modules-license-crawler","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gabts/node-modules-license-crawler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fnode-modules-license-crawler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fnode-modules-license-crawler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fnode-modules-license-crawler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fnode-modules-license-crawler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabts","download_url":"https://codeload.github.com/gabts/node-modules-license-crawler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fnode-modules-license-crawler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065442,"owners_count":24520946,"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-08-12T02:00:09.011Z","response_time":80,"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-12-30T19:34:36.570Z","updated_at":"2025-08-12T13:07:55.078Z","avatar_url":"https://github.com/gabts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Modules License Crawler\n\nCrawls dependencies recursively from your package.json file and finds license texts from packages in node_modules. Note: development and peer dependencies are skipped.\n\n## Install\n\n```sh\nnpm install node-modules-license-crawler\n```\n\n## Usage\n\n```js\nvar fs = require(\"fs\");\nvar nodeModulesLicenseCrawler = require(\"node-modules-license-crawler\");\n\nvar data = nodeModulesLicenseCrawler();\n\nfs.writeFileSync(\"./licenses.json\", JSON.stringify(data));\n```\n\n## Sample output\n\nIf [`react`](https://github.com/facebook/react) was your only dependency the output would look like this. The modules text value refers to an index in the texts array. This is for if you want to save some space as you often have a few modules with the same exact license text content (like `react` and `react-is` does here).\n\nModules where we couldn't find a license have text value `null` instead of an index number.\n\n```json\n{\n  \"modules\": [\n    {\n      \"name\": \"js-tokens\",\n      \"version\": \"4.0.0\",\n      \"license\": \"MIT\",\n      \"text\": 2\n    },\n    {\n      \"name\": \"loose-envify\",\n      \"version\": \"1.4.0\",\n      \"license\": \"MIT\",\n      \"text\": 1\n    },\n    {\n      \"name\": \"object-assign\",\n      \"version\": \"4.1.1\",\n      \"license\": \"MIT\",\n      \"text\": 3\n    },\n    {\n      \"name\": \"prop-types\",\n      \"version\": \"15.7.2\",\n      \"license\": \"MIT\",\n      \"text\": 4\n    },\n    {\n      \"name\": \"react\",\n      \"version\": \"16.14.0\",\n      \"license\": \"MIT\",\n      \"text\": 0\n    },\n    {\n      \"name\": \"react-is\",\n      \"version\": \"16.13.1\",\n      \"license\": \"MIT\",\n      \"text\": 0\n    }\n  ],\n  \"texts\": [\n    \"MIT License\\n\\nCopyright (c) Facebook, Inc. and its affiliates.\\n ...\",\n    \"The MIT License (MIT)\\n\\nCopyright (c) 2015 Andres Suarez \u003czertos ...\",\n    \"The MIT License (MIT)\\n\\nCopyright (c) 2014, 2015, 2016, 2017, 20 ...\",\n    \"The MIT License (MIT)\\n\\nCopyright (c) Sindre Sorhus \u003csindresorhu ...\",\n    \"MIT License\\n\\nCopyright (c) 2013-present, Facebook, Inc.\\n\\nPerm ...\"\n  ]\n}\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabts%2Fnode-modules-license-crawler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabts%2Fnode-modules-license-crawler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabts%2Fnode-modules-license-crawler/lists"}