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

spdx-expression-validate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spdx-expression-validate

validate SPDX license expressions

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is spdx-expression-validate?

The spdx-expression-validate npm package is used to validate SPDX license expressions. SPDX (Software Package Data Exchange) is a standard format for communicating the components, licenses, and copyrights associated with software packages. This package ensures that the given license expressions conform to the SPDX specification.

What are spdx-expression-validate's main functionalities?

Validate SPDX License Expression

This feature allows you to validate whether a given SPDX license expression is valid according to the SPDX specification. The code sample demonstrates how to use the package to validate the expression 'MIT OR Apache-2.0'.

const validate = require('spdx-expression-validate');

const expression = 'MIT OR Apache-2.0';
const isValid = validate(expression);
console.log(isValid); // true

Invalid SPDX License Expression

This feature allows you to check if an invalid SPDX license expression is correctly identified as invalid. The code sample demonstrates how to use the package to validate the expression 'Invalid-License'.

const validate = require('spdx-expression-validate');

const expression = 'Invalid-License';
const isValid = validate(expression);
console.log(isValid); // false

Other packages similar to spdx-expression-validate

Keywords

FAQs

Package last updated on 15 Feb 2019

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