Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 0.1.1 to 0.1.2

5

package.json
{
"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
```
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