odin-javascript-exercises/node_modules/spdx-correct
2021-05-09 00:39:21 +12:00
..
index.js Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00
LICENSE Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00
package.json Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00
README.md Clean up the oopsie. Rebuild the blank exercises. 2021-05-09 00:39:21 +12:00

var correct = require('spdx-correct')
var assert = require('assert')

assert.equal(correct('mit'), 'MIT')

assert.equal(correct('Apache 2'), 'Apache-2.0')

assert(correct('No idea what license') === null)

// disable upgrade option
assert(correct('GPL-3.0'), 'GPL-3.0-or-later')
assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0')