Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md « spdx-correct « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab388cf9406486c7290beed1f252f0c1a21868c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
```javascript
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')
```