Socket
Socket
Sign inDemoInstall

spdx-satisfies

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spdx-satisfies - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

8

index.js

@@ -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(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc