spdx-correct

correct invalid SPDX expressions

Apache-2.0 18 个版本
安装
npm install spdx-correct
yarn add spdx-correct
pnpm add spdx-correct
bun add spdx-correct
README

Usage

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

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

assert.strictEqual(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')

Contributors

spdx-correct has benefited from the work of several contributors. See the GitHub repository for more information.

版本列表
3.2.0 2023-03-07
3.1.1 2020-05-22
3.1.0 2018-12-06
3.0.2 2018-10-04
3.0.1 2018-09-27
3.0.0 2018-02-27
2.0.4 2017-07-31
2.0.3 2017-06-13
2.0.2 2017-06-07
2.0.1 2017-06-06
2.0.0 2017-02-14
1.0.2 2015-10-26
1.0.1 2015-08-23
1.0.0 2015-06-05
1.0.0-prerelease-4 2015-06-05
1.0.0-prerelease-3 2015-05-06
1.0.0-prerelease-2 2015-05-03
1.0.0-prerelease-1 2015-04-29