Lines Matching refs:valid
4 Give me a string and I'll tell you if it's a valid npm package license string.
7 var valid = require('validate-npm-package-license');
10 SPDX license identifiers are valid license strings:
21 assert.deepEqual(valid('MIT'), validSPDXExpression);
22 assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression);
23 assert.deepEqual(valid('Apache-2.0'), validSPDXExpression);
24 assert.deepEqual(valid('ISC'), validSPDXExpression);
30 valid('Apache 2.0'),
36 'a valid SPDX license expression (without "LicenseRef"), ' +
39 'license is similar to the valid expression "Apache-2.0"'
45 SPDX expressions are valid, too ...
50 valid('(GPL-3.0-only OR BSD-2-Clause)'),
64 'a valid SPDX license expression (without "LicenseRef"), ' +
71 valid('LicenseRef-Made-Up'),
76 valid('(MIT OR LicenseRef-Made-Up)'),
85 valid('SEE LICENSE IN LICENSE.txt'),
94 valid('SEE LICENSE IN license.md'),
111 assert.deepEqual(valid('UNLICENSED'), unlicensed);
112 assert.deepEqual(valid('UNLICENCED'), unlicensed);