Gathering detailed insights and metrics for @metamask/spdx-satisfies
Gathering detailed insights and metrics for @metamask/spdx-satisfies
test whether SPDX expressions satisfy licensing criteria
npm install @metamask/spdx-satisfies
Typescript
Module System
Node Version
NPM Version
69
Supply Chain
78.8
Quality
82.8
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
3,822
Last Day
13
Last Week
75
Last Month
270
Last Year
3,822
1 Stars
53 Commits
1 Watching
11 Branches
22 Contributors
Minified
Minified + Gzipped
Latest Version
6.0.0
Package Id
@metamask/spdx-satisfies@6.0.0
Unpacked Size
8.37 kB
Size
2.83 kB
File Count
4
NPM Version
8.19.4
Node Version
16.20.2
Publised On
08 Feb 2024
Cumulative downloads
Total Downloads
Last day
-35%
13
Compared to previous day
Last week
29.3%
75
Compared to previous week
Last month
-31.1%
270
Compared to previous month
Last year
0%
3,822
Compared to previous year
3
1const assert = require('assert') 2const satisfies = require('@metamask/spdx-satisfies') 3 4assert(satisfies('MIT', 'MIT')) 5 6assert(satisfies('MIT', '(ISC OR MIT)')) 7assert(satisfies('Zlib', '(ISC OR (MIT OR Zlib))')) 8assert(!satisfies('GPL-3.0', '(ISC OR MIT)')) 9 10assert(satisfies('GPL-2.0', 'GPL-2.0+')) 11assert(satisfies('GPL-3.0', 'GPL-2.0+')) 12assert(satisfies('GPL-1.0+', 'GPL-2.0+')) 13assert(!satisfies('GPL-1.0', 'GPL-2.0+')) 14assert(satisfies('GPL-2.0-only', 'GPL-2.0-only')) 15assert(satisfies('GPL-3.0-only', 'GPL-2.0+')) 16assert(satisfies('LGPL-3.0-only', 'LGPL-3.0-or-later')) 17assert(satisfies('GPL-2.0', 'GPL-2.0+')) 18assert(satisfies('GPL-2.0-only', 'GPL-2.0+')) 19assert(satisfies('GPL-2.0', 'GPL-2.0-or-later')) 20 21assert(!satisfies( 22 'GPL-2.0', 23 'GPL-2.0+ WITH Bison-exception-2.2' 24)) 25 26assert(satisfies( 27 'GPL-3.0 WITH Bison-exception-2.2', 28 'GPL-2.0+ WITH Bison-exception-2.2' 29)) 30 31assert(satisfies('(MIT OR GPL-2.0)', '(ISC OR MIT)')) 32assert(satisfies('(MIT AND GPL-2.0)', '(MIT AND GPL-2.0)')) 33assert(satisfies('MIT AND GPL-2.0 AND ISC', 'MIT AND GPL-2.0 AND ISC')) 34assert(satisfies('MIT AND GPL-2.0 AND ISC', 'ISC AND GPL-2.0 AND MIT')) 35assert(satisfies('(MIT OR GPL-2.0) AND ISC', 'MIT AND ISC')) 36assert(satisfies('MIT AND ISC', '(MIT OR GPL-2.0) AND ISC')) 37assert(satisfies('MIT AND ISC', '(MIT AND GPL-2.0) OR ISC')) 38assert(satisfies('(MIT OR Apache-2.0) AND (ISC OR GPL-2.0)', 'Apache-2.0 AND ISC')) 39assert(satisfies('(MIT OR Apache-2.0) AND (ISC OR GPL-2.0)', 'Apache-2.0 OR ISC')) 40assert(satisfies('(MIT AND GPL-2.0)', '(MIT OR GPL-2.0)')) 41assert(satisfies('(MIT AND GPL-2.0)', '(GPL-2.0 AND MIT)')) 42assert(satisfies('MIT', '(GPL-2.0 OR MIT) AND (MIT OR ISC)')) 43assert(satisfies('MIT AND ICU', '(MIT AND GPL-2.0) OR (ISC AND (Apache-2.0 OR ICU))')) 44assert(!satisfies('(MIT AND GPL-2.0)', '(ISC OR GPL-2.0)')) 45assert(!satisfies('MIT AND (GPL-2.0 OR ISC)', 'MIT')) 46assert(!satisfies('(MIT OR Apache-2.0) AND (ISC OR GPL-2.0)', 'MIT'))
No vulnerabilities found.
No security vulnerabilities found.