spdx-satisfies
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "spdx-satisfies", | ||
"description": "test whether SPDX expressions satisfy licensing criteria", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)", | ||
@@ -11,2 +11,3 @@ "dependencies": { | ||
"devDependencies": { | ||
"jsmd-tape": "^0.1.0", | ||
"tape": "4.x" | ||
@@ -18,4 +19,4 @@ }, | ||
"scripts": { | ||
"test": "tape test.js" | ||
"test": "jsmd-tape README.md | node" | ||
} | ||
} |
Test whether SPDX expressions satisfy given licensing criteria | ||
```shellsession | ||
npm install --save spdx-satisfies | ||
``` | ||
In JavaScript: | ||
<!--js | ||
var satisfies = require('./'); | ||
--> | ||
```js | ||
satisfies('MIT', 'MIT') // => true | ||
satisfies('MIT', '(ISC OR MIT)') // => true | ||
satisfies('Zlib', '(ISC OR (MIT OR Zlib))') // => true | ||
satisfies('GPL-3.0', '(ISC OR MIT)') // => false | ||
satisfies('GPL-2.0', 'GPL-2.0+') // => true | ||
satisfies('GPL-3.0', 'GPL-2.0+') // => true | ||
satisfies('GPL-1.0', 'GPL-2.0+') // => false | ||
satisfies( | ||
'GPL-2.0', | ||
'GPL-2.0+ WITH Bison-exception-2.2' | ||
) // => false | ||
satisfies( | ||
'GPL-3.0 WITH Bison-exception-2.2', | ||
'GPL-2.0+ WITH Bison-exception-2.2' | ||
) // => true | ||
satisfies('(MIT OR GPL-2.0)', '(ISC OR MIT)') // => true | ||
satisfies('(MIT AND GPL-2.0)', '(MIT OR GPL-2.0)') // => true | ||
satisfies('(MIT AND GPL-2.0)', '(ISC OR GPL-2.0)') // => false | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37
3372
2
3