2023-03-12 09:52:00 +00:00
|
|
|
## Usage
|
|
|
|
|
2022-01-21 08:28:41 +00:00
|
|
|
```javascript
|
|
|
|
var correct = require('spdx-correct')
|
|
|
|
var assert = require('assert')
|
|
|
|
|
2023-03-12 09:52:00 +00:00
|
|
|
assert.strictEqual(correct('mit'), 'MIT')
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-03-12 09:52:00 +00:00
|
|
|
assert.strictEqual(correct('Apache 2'), 'Apache-2.0')
|
2022-01-21 08:28:41 +00:00
|
|
|
|
|
|
|
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')
|
|
|
|
```
|
2023-03-12 09:52:00 +00:00
|
|
|
|
|
|
|
## Contributors
|
|
|
|
|
|
|
|
spdx-correct has benefited from the work of several contributors.
|
|
|
|
See [the GitHub repository](https://github.com/jslicense/spdx-correct.js/graphs/contributors)
|
|
|
|
for more information.
|