{"id":16244602,"url":"https://github.com/indexzero/license-tree","last_synced_at":"2025-03-19T18:33:17.141Z","repository":{"id":57290143,"uuid":"69476746","full_name":"indexzero/license-tree","owner":"indexzero","description":"Read a tree of files and check for licenses. ","archived":false,"fork":false,"pushed_at":"2016-09-28T16:04:34.000Z","size":5,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T21:04:10.718Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indexzero.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}},"created_at":"2016-09-28T15:23:34.000Z","updated_at":"2024-07-03T09:11:34.000Z","dependencies_parsed_at":"2022-08-25T07:41:04.747Z","dependency_job_id":null,"html_url":"https://github.com/indexzero/license-tree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Flicense-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Flicense-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Flicense-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Flicense-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indexzero","download_url":"https://codeload.github.com/indexzero/license-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244013980,"owners_count":20383712,"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-10T14:19:53.927Z","updated_at":"2025-03-19T18:33:16.843Z","avatar_url":"https://github.com/indexzero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# license-tree\n\nRead a tree of files and check for licenses.\n\n## Usage\n\n``` js\nconst path = require('path');\nconst licenseTree = require('license-tree');\n\nconst checkDir = path.resolve('path', 'to', 'check');\n\nlicenseTree({ dir: checkDir }, function (err, licenses) {\n  if (err) { throw err; /* handle me */ }\n\n  //\n  // Returns the licenses found and the full path of the files\n  // they were found in.\n  //\n  // [{ license: 'MIT', file: 'path/to/check/file/with/MIT/license' }]\n  //\n  console.dir(licenses);\n});\n```\n\n## Audit trail\n\nIf you're concerned with having a log for every file that has been checked, you can run with:\n\n```\nDEBUG=license* node your-script-using-license-tree.js\n```\n\nThis will give you the output from both `license-tree` and [`licenses`](https://github.com/3rd-Eden/licenses) which does all the heavy lifting for parsing and comparison. e.g.:\n\n``` sh\nDEBUG=license* npm test\n```\n\n```\n  licenses::parser had a 1.3513513513513513% match for W3C +0ms\n  licenses::parser had a 0% match for WXwindows +0ms\n  licenses::parser had a 80% match for Xnet +0ms\n  licenses::parser had a 1.4084507042253522% match for ZPL 2.0 +0ms\n  licenses::parser had a 32.5% match for Unlicense +1ms\n  licenses::parser had a 0% match for WTFPL +0ms\n  licenses::parser had a 0% match for zlib/libpng +0ms\nlicense-tree:found License {\"license\":\"MIT\",\"file\":\"/license-tree/node_modules/async/LICENSE\"}\nlicense-tree Read /license-tree/node_modules/async/README.md\n  licenses::parser had a 0% match for AFL 2.1 +1ms\n  licenses::parser had a 0% match for AFL 3.0 +0ms\n  licenses::parser had a 0% match for AGPL 3.0 +0ms\n  licenses::parser had a 0.06858710562414265% match for APL 1.0 +1ms\n  licenses::parser had a 0% match for Artistic 2.0 +0ms\n  licenses::parser had a 0% match for Apache 2.0 +1ms\n  licenses::parser had a 0% match for Apple 2.0 +0ms\n  licenses::parser had a 0% match for AAL +0ms\n  licenses::parser had a 0% match for Apache +0ms\n  licenses::parser had a 0% match for Beerware +0ms\n  licenses::parser had a 0% match for BSD 2-Clause +0ms\n  licenses::parser had a 0% match for BSD 3-Clause +0ms\n```\n\n## Tests\n\n``` sh\nnpm test\n```\n\n##### Author: [Charlie Robbins](https://github.com/indexzero)\n##### LICENSE: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Flicense-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findexzero%2Flicense-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Flicense-tree/lists"}