spdx-satisfies
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -79,3 +79,3 @@ var compare = require('spdx-compare') | ||
function endsWith (string, substring) { | ||
return string.indexOf(substring) === string.length - 1 | ||
return string.indexOf(substring) === string.length - substring.length | ||
} | ||
@@ -93,3 +93,3 @@ | ||
function expand (expression) { | ||
return sort(Array.from(expandInner(expression))) | ||
return sort(expandInner(expression)) | ||
} | ||
@@ -99,4 +99,4 @@ | ||
function flatten (expression) { | ||
const expanded = Array.from(expandInner(expression)) | ||
const flattened = expanded.reduce(function (result, clause) { | ||
var expanded = expandInner(expression) | ||
var flattened = expanded.reduce(function (result, clause) { | ||
return Object.assign(result, clause) | ||
@@ -103,0 +103,0 @@ }, {}) |
{ | ||
"name": "spdx-satisfies", | ||
"description": "test whether SPDX expressions satisfy licensing criteria", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)", | ||
@@ -33,2 +33,5 @@ "contributors": [ | ||
"repository": "kemitchell/spdx-satisfies.js", | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
@@ -35,0 +38,0 @@ "test": "defence -i javascript README.md | replace-require-self | node", |
@@ -17,2 +17,6 @@ ```javascript | ||
assert(satisfies('GPL-3.0-only', 'GPL-2.0+')) | ||
assert(satisfies('LGPL-3.0-only', 'LGPL-3.0-or-later')) | ||
assert(satisfies('GPL-2.0', 'GPL-2.0+')) | ||
assert(satisfies('GPL-2.0-only', 'GPL-2.0+')) | ||
assert(satisfies('GPL-2.0', 'GPL-2.0-or-later')) | ||
@@ -19,0 +23,0 @@ assert(!satisfies( |
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
8375
49