spdx-satisfies
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "spdx-satisfies", | ||
"description": "test whether SPDX expressions satisfy licensing criteria", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)", | ||
"dependencies": { | ||
"spdx": "0.4.x", | ||
"spdx-compare": "0.1.x" | ||
"spdx-compare": "^0.1.2", | ||
"spdx-expression-parse": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"jsmd-tape": "^0.1.0", | ||
"tape": "4.x" | ||
"defence-cli": "^1.0.1" | ||
}, | ||
"keywords": [ | ||
"SPDX", | ||
"law", | ||
"legal", | ||
"license", | ||
"metadata", | ||
"package", | ||
"package.json", | ||
"standards" | ||
], | ||
"license": "MIT", | ||
"main": "spdx-satisfies.js", | ||
"repository": "kemitchell/spdx-satisfies.js", | ||
"scripts": { | ||
"test": "jsmd-tape README.md | node" | ||
"test": "defence -i javascript README.md | sed 's!spdx-satisfies!./!' | node" | ||
} | ||
} |
@@ -1,36 +0,28 @@ | ||
Test whether SPDX expressions satisfy given licensing criteria | ||
```javascript | ||
var assert = require('assert') | ||
var satisfies = require('spdx-satisfies') | ||
```shellsession | ||
npm install --save spdx-satisfies | ||
``` | ||
assert(satisfies('MIT', 'MIT')) | ||
In JavaScript: | ||
assert(satisfies('MIT', '(ISC OR MIT)')) | ||
assert(satisfies('Zlib', '(ISC OR (MIT OR Zlib))')) | ||
assert(!satisfies('GPL-3.0', '(ISC OR MIT)')) | ||
<!--js | ||
var satisfies = require('./'); | ||
--> | ||
assert(satisfies('GPL-2.0', 'GPL-2.0+')) | ||
assert(satisfies('GPL-3.0', 'GPL-2.0+')) | ||
assert(!satisfies('GPL-1.0', 'GPL-2.0+')) | ||
```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( | ||
assert(!satisfies( | ||
'GPL-2.0', | ||
'GPL-2.0+ WITH Bison-exception-2.2' | ||
) // => false | ||
satisfies( | ||
)) | ||
assert(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 | ||
assert(satisfies('(MIT OR GPL-2.0)', '(ISC OR MIT)')) | ||
assert(satisfies('(MIT AND GPL-2.0)', '(MIT OR GPL-2.0)')) | ||
assert(!satisfies('(MIT AND GPL-2.0)', '(ISC OR GPL-2.0)')) | ||
``` |
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
4475
1
4
29
+ Addedspdx-expression-parse@^1.0.0
- Removedspdx@0.4.x
- Removedspdx@0.4.3(transitive)
- Removedspdx-license-ids@1.2.2(transitive)
Updatedspdx-compare@^0.1.2