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

test whether SPDX expressions satisfy licensing criteria

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
328K
decreased by-52.81%
Maintainers
1
Weekly downloads
 
Created

What is spdx-satisfies?

The spdx-satisfies npm package is used to determine if a given SPDX license expression satisfies another SPDX license expression. This is particularly useful for license compliance checks in software projects.

What are spdx-satisfies's main functionalities?

Check if a license satisfies another license

This feature allows you to check if one license satisfies another license. In this example, the MIT license satisfies the 'MIT OR Apache-2.0' license expression.

const spdxSatisfies = require('spdx-satisfies');

const license1 = 'MIT';
const license2 = 'MIT OR Apache-2.0';

const result = spdxSatisfies(license1, license2);
console.log(result); // true

Check if a complex license expression satisfies another

This feature allows you to check if a complex license expression satisfies another complex license expression. In this example, the '(MIT AND Apache-2.0)' license expression satisfies the '(MIT AND Apache-2.0) OR GPL-3.0' license expression.

const spdxSatisfies = require('spdx-satisfies');

const license1 = '(MIT AND Apache-2.0)';
const license2 = '(MIT AND Apache-2.0) OR GPL-3.0';

const result = spdxSatisfies(license1, license2);
console.log(result); // true

Other packages similar to spdx-satisfies

FAQs

Package last updated on 18 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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