Gathering detailed insights and metrics for spdx
Gathering detailed insights and metrics for spdx
npm install spdx
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
11,636,688
Last Day
3,046
Last Week
18,270
Last Month
154,861
Last Year
1,695,071
53 Stars
81 Commits
9 Forks
8 Watching
6 Branches
3 Contributors
Minified
Minified + Gzipped
Latest Version
0.5.2
Package Id
spdx@0.5.2
Size
12.22 kB
NPM Version
6.3.0
Node Version
8.11.1
Publised On
06 Aug 2018
Cumulative downloads
Total Downloads
Last day
-33.3%
3,046
Compared to previous day
Last week
-45.5%
18,270
Compared to previous week
Last month
-8.8%
154,861
Compared to previous month
Last year
39.9%
1,695,071
Compared to previous year
2
3
Development on spdx.js has moved to separate, smaller packages.
spdx-expression-parse and spdx-satisfies are direct successors to spdx.js.
You may also be interested in spdx-compare, spdx-correct, and other packages on the npm public registry. kemitchell writes a lot of them.
1var spdx = require('spdx')
1var assert = require('assert') 2assert(spdx.valid('Invalid-Identifier') === null) 3assert(spdx.valid('GPL-2.0')) 4assert(spdx.valid('GPL-2.0+')) 5assert(spdx.valid('LicenseRef-23')) 6assert(spdx.valid('LicenseRef-MIT-Style-1')) 7assert(spdx.valid('DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2'))
OR
Operator1assert(spdx.valid('(LGPL-2.1 OR MIT)')) 2assert(spdx.valid('(LGPL-2.1 OR MIT OR BSD-3-Clause)'))
AND
Operator1assert(spdx.valid('(LGPL-2.1 AND MIT)')) 2assert(spdx.valid('(LGPL-2.1 AND MIT AND BSD-2-Clause)'))
WITH
Operator1assert(spdx.valid('(GPL-2.0+ WITH Bison-exception-2.2)'))
1assert.deepEqual( 2 spdx.parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'), 3 { left: { license: 'LGPL-2.1' }, 4 conjunction: 'or', 5 right: { 6 left: { license: 'BSD-3-Clause' }, 7 conjunction: 'and', 8 right: { license: 'MIT' } } }) 9 10assert.deepEqual( 11 spdx.parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), 12 { left: { license: 'MIT' }, 13 conjunction: 'and', 14 right: { 15 left: { 16 license: 'LGPL-2.1', 17 plus: true }, 18 conjunction: 'and', 19 right: { license: 'BSD-3-Clause' } } })
1assert(!spdx.valid('MIT ')) 2assert(!spdx.valid(' MIT')) 3assert(!spdx.valid('MIT AND BSD-3-Clause'))
1assert(Array.isArray(spdx.licenses)) 2assert(spdx.licenses.indexOf('ISC') > -1) 3assert(spdx.licenses.indexOf('Apache-1.7') < 0) 4assert(spdx.licenses.every(function(element) { 5 return typeof element === 'string' })) 6 7assert(Array.isArray(spdx.exceptions)) 8assert(spdx.exceptions.indexOf('GCC-exception-3.1') > -1) 9assert(spdx.exceptions.every(function(element) { 10 return typeof element === 'string' }))
1assert.equal(spdx.specificationVersion, '2.0')
The Software Package Data Exchange (SPDX) specification is the work of the Linux Foundation and its contributors, and is licensed under the terms of the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0"). "SPDX" is a United States federally registered trademark of the Linux Foundation.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/29 approved changesets -- score normalized to 0
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
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
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