spdx-satisfies 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -76,7 +76,9 @@ function replaceGPLOnlyOrLaterWithRanges (argument) {
76
76
  }
77
77
 
78
78
  function endsWith (string, substring) {
79
- return string.indexOf(substring) === string.length - substring.length
79
+ const index = string.indexOf(substring)
80
+ if (index === -1) return false
81
+ return index === string.length - substring.length
80
82
  }
81
83
 
82
84
  function licenseString (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spdx-satisfies",
3
3
  "description": "test whether SPDX expressions satisfy licensing criteria",
4
- "version": "6.0.0",
4
+ "version": "6.0.1",
5
5
  "author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
6
6
  "contributors": [
7
7
  "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",