tree: 09bdcc226ed0805d51d85c8409b1c37c80ba102c [path history] [tgz]
  1. index.js
  2. LICENSE.md
  3. package.json
  4. README.md
  5. test.log
third_party/devtools/node_modules/spdx-compare/README.md
var assert = require('assert')
var compare = require('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(function () {
  compare.gt('(MIT OR ISC)', 'GPL-3.0')
}, '"(MIT OR ISC)" is not a simple license identifier')