{"id":19068820,"url":"https://github.com/cutenode/liblice","last_synced_at":"2025-10-17T05:03:49.340Z","repository":{"id":74933782,"uuid":"194709222","full_name":"cutenode/liblice","owner":"cutenode","description":"📄 liblice is a module to detect licenses throughout your entire installed dependency tree.","archived":false,"fork":false,"pushed_at":"2022-09-19T01:09:33.000Z","size":193,"stargazers_count":16,"open_issues_count":1,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-28T14:06:34.253Z","etag":null,"topics":["license","license-checking","module","node","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cutenode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-07-01T16:37:44.000Z","updated_at":"2023-01-03T00:55:30.000Z","dependencies_parsed_at":"2023-06-18T12:18:48.846Z","dependency_job_id":null,"html_url":"https://github.com/cutenode/liblice","commit_stats":{"total_commits":89,"total_committers":6,"mean_commits":"14.833333333333334","dds":0.0786516853932584,"last_synced_commit":"25d3771e116e290c5df109449edc98daa9ab1f96"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fliblice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fliblice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fliblice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutenode%2Fliblice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cutenode","download_url":"https://codeload.github.com/cutenode/liblice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326839,"owners_count":21571634,"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":["license","license-checking","module","node","nodejs","npm"],"created_at":"2024-11-09T01:12:08.526Z","updated_at":"2025-10-17T05:03:49.291Z","avatar_url":"https://github.com/cutenode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# liblice\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/cutenode/liblice.svg)](https://greenkeeper.io/)\n\nliblice is a module to detect licenses throughout your entire _installed_ dependency tree.\n\nliblice crawls `node_modules`, fetches all `package.json` files, and parses them. It can return the data it fetches in a few different ways, depending on how you want to consume it.\n\n## Installation\n\n```bash\nnpm install liblice\n```\n\n## Usage\n\n### `list` Output\n\nReturns an array of all licenses – plus any invalid licenses – within the node modules of the passed directory.\n\n```js\nconst { list } = require('liblice')\n\nlist('.') // where the current working directory has node_modules\n```\n\n### `modules` Output\n\nReturns an object of all modules, their license expression, the path to the module, their version, their author, and their [conformance information](#what-is-conformance-information).\n\n```js\nconst { modules } = require('liblice')\n\nmodules('.') // where the current working directory has node_modules\n```\n\n### `licenses` Output\n\nReturns an object the names of every license as a key, with the value being an object of objects that includes:\n\n- All packages that use the license\n- Conformance information for that license\n- Total number of occurrences of the license\n\n```js\nconst { licenses }  = require('liblice')\n\nlicenses('.') // where the current working directory has node_modules\n```\n\n## What is Conformance Information\n\nConformance information is information that could be useful in the context of license conformance. Specifically, information included is a full list of all individual license IDs in the license expression (often this is identical to the license expression itself, but sometimes it's not), the links to the SPDX-hosted versions of the included licenses, and information that mirrors what can be found in the SPDX license list:\n\n- The `osi` property, which indicates if all licenses in the license expression are OSI compliant\n- The `fsf` property, which indicates if all licenses in the license expression are FSF compliant\n- The `fsfAndOSI` property, which indicates if all licenses in the license expression are **both** OSI and FSF compliant\n- The `includesDeprecated` property, which indicates if **one or more** licenses in the license expression are deprecated IDs.\n\n## Caveats\n\nCurrently, liblice excludes searching any directory in `node_modules` that includes `/.bin/` since it is a problematic directory and doesn't actually add any value that is not already otherwise derived.\n\n## TODOs\n\n- Perhaps detect pacakge.json in passed path as validation?\n- Tests. Always tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutenode%2Fliblice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutenode%2Fliblice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutenode%2Fliblice/lists"}