Installations
npm install spdx-license-list
Developer Guide
Typescript
Yes
Module System
N/A
Min. Node Version
>=8
Node Version
21.6.2
NPM Version
9.2.0
Score
99.8
Supply Chain
92.9
Quality
76.8
Maintenance
100
Vulnerability
63.2
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (82.73%)
TypeScript (17.27%)
Developer
sindresorhus
Download Statistics
Total Downloads
34,875,744
Last Day
55,559
Last Week
291,881
Last Month
964,349
Last Year
12,408,394
GitHub Statistics
88 Stars
63 Commits
16 Forks
9 Watching
1 Branches
10 Contributors
Bundle Size
91.79 kB
Minified
20.87 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
6.9.0
Package Id
spdx-license-list@6.9.0
Unpacked Size
9.50 MB
Size
2.26 MB
File Count
650
NPM Version
9.2.0
Node Version
21.6.2
Publised On
21 Feb 2024
Total Downloads
Cumulative downloads
Total Downloads
34,875,744
Last day
4.6%
55,559
Compared to previous day
Last week
14%
291,881
Compared to previous week
Last month
-18.5%
964,349
Compared to previous month
Last year
22.4%
12,408,394
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
spdx-license-list
List of SPDX licenses
The lists of licenses are just JSON files and can be used anywhere.
- spdx.json contains just license metadata
- spdx-full.json includes the license text too
- spdx-simple.json only contains the license IDs
Using SPDX License List version 3.23 (2024-02-08)
Install
1npm install spdx-license-list
Usage
1const spdxLicenseList = require('spdx-license-list'); 2 3console.log(spdxLicenseList.MIT); 4/* 5{ 6 name: 'MIT License', 7 url: 'http://www.opensource.org/licenses/MIT', 8 osiApproved: true 9} 10*/
1const mitLicense = require('spdx-license-list/licenses/MIT'); 2 3console.log(mitLicense.licenseText); 4//=> 'MIT License\r\n\r\nCopyright (c) <year> <copyright holders> …'
You can also get a version with the licence text included:
1const spdxLicenseList = require('spdx-license-list/full'); 2 3console.log(spdxLicenseList.MIT); 4/* 5{ 6 name: 'MIT License', 7 url: 'http://www.opensource.org/licenses/MIT', 8 osiApproved: true, 9 licenseText: '…' 10} 11*/
Or just the license IDs as a Set
:
1const spdxLicenseList = require('spdx-license-list/simple'); 2 3console.log(spdxLicenseList); 4//=> Set {'Glide', 'Abstyles', …}
API
spdxLicenseList
Type: object
The licenses are indexed by their identifier and contains a name
property with the full name of the license, url
with the URL to the license, and osiApproved
boolean for whether the license is OSI Approved.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: license:0
Reason
no binaries found in the repo
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/spdx-license-list/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/spdx-license-list/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 5 are checked with a SAST tool
Score
3.5
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More