var assert = require('assert')
var compare = require('@metamask/spdx-compare')
assert(compare.gt('GPL-3.0', 'GPL-2.0'))
assert(compare.gt('GPL-3.0-only', 'GPL-2.0-only'))
assert(compare.gt('GPL-2.0-or-later', 'GPL-2.0-only'))
assert(compare.eq('GPL-3.0-or-later', 'GPL-3.0-only'))
assert(compare.lt('MPL-1.0', 'MPL-2.0'))
assert(compare.gt('LPPL-1.3a', 'LPPL-1.0'))
assert(compare.gt('LPPL-1.3c', 'LPPL-1.3a'))
assert(!compare.gt('MIT', 'ISC'))
assert(!compare.gt('OSL-1.0', 'OPL-1.0'))
assert(compare.gt('AGPL-3.0', 'AGPL-1.0'))
assert.throws(() => {
compare.gt('(MIT OR ISC)', 'GPL-3.0')
}, /"\(MIT OR ISC\)" is not a simple license identifier/)
forked from jslicense/spdx-compare.js
-
Notifications
You must be signed in to change notification settings - Fork 0
compare SPDX license expressions
License
MetaMask/spdx-compare.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
compare SPDX license expressions
Resources
License
Code of conduct
Security policy
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 100.0%