Installations
npm install spdx-licenses
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
10.15.1
NPM Version
6.4.1
Score
91.8
Supply Chain
94.9
Quality
74.9
Maintenance
50
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
stdarg
Download Statistics
Total Downloads
2,992,887
Last Day
3,118
Last Week
12,702
Last Month
58,207
Last Year
484,903
GitHub Statistics
6 Stars
15 Commits
3 Forks
3 Watching
2 Branches
3 Contributors
Bundle Size
41.75 kB
Minified
10.55 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.0
Package Id
spdx-licenses@1.0.0
Size
6.89 kB
NPM Version
6.4.1
Node Version
10.15.1
Publised On
19 Mar 2019
Total Downloads
Cumulative downloads
Total Downloads
2,992,887
Last day
4.6%
3,118
Compared to previous day
Last week
-4.7%
12,702
Compared to previous week
Last month
-16.4%
58,207
Compared to previous month
Last year
72.8%
484,903
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
spdx-licenses
A simple module to determine if a license id is a valid SPDX license and if it is, get the full name and a flag indicating if the license is OSI approved.
Each license entry has the following information:
- name - The full name of the license, e.g. "Academic Free License v3.0"
- id - The abbreviated id you used to acquire the license, e.g. "AFL-3.0"
- OSIApproved - A boolean flag that is true when the license is OSI approved.
An exmaple license follows:
1 "MIT": { 2 "name": "MIT License", 3 "id": "MIT", 4 "OSIApproved": true 5 }
Example usage
1 var spdxLicenses = require('spdx-license'); 2 var target = 'LGPL-3.0+'; 3 var license = spdxLicenses.spdx(target); 4 5 if (license) { 6 console.log('We are working with the Software Package Data Exchange® '+ 7 'list version: ', spdxLicenses.version); 8 console.log('The full name for "LGPL-3.0+" is: '+license.name); 9 10 if (license.OSIApproved) 11 console.log('The license is OSI approved.'); 12 else 13 console.log('The license is not OSI approved.'); 14 } else { 15 console.error('There is no such license as '+target); 16 }
The above results in the following output:
We are working with the Software Package Data Exchange® list version: 1.19
The full name for "LGPL-3.0+" is: GNU Lesser General Public License v3.0 or later
The license is OSDI approved.
version
The version of the SPDX License List from https://spdx.org/licenses/ - This is a literal non-semver-compliant string, e.g. "1.19".
spdx(id)
Get info on a license for a given license id. And, if not a valid SPDX license id, return false.
Param:
- String id The SPDX license id, e.g. "MIT", "Apache-2.0", etc.
Returns:
- Object|Boolean Returns an object with the info on the licese or false if there is no such license id.
License
The MIT License (MIT)
Copyright (c) 2014 Edmond Meinfelder
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/13 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
no effort to earn an OpenSSF best practices badge detected
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
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 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Reason
24 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.9
/10
Last Scanned on 2025-01-27
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