
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
spdx-correct
Advanced tools
var correct = require('spdx-correct')
var assert = require('assert')
assert.strictEqual(correct('mit'), 'MIT')
assert.strictEqual(correct('Apache 2'), 'Apache-2.0')
assert(correct('No idea what license') === null)
// disable upgrade option
assert(correct('GPL-3.0'), 'GPL-3.0-or-later')
assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0')
spdx-correct has benefited from the work of several contributors. See the GitHub repository for more information.
This package parses valid SPDX license expressions, ensuring they conform to the SPDX specification. Unlike spdx-correct, it does not correct invalid expressions but rather parses and validates the structure of valid SPDX expressions.
This package provides a list of SPDX license identifiers. It can be used to validate if a given license identifier is a valid SPDX identifier. It does not correct invalid identifiers but can be used to check validity against the list of known identifiers.
This package checks if a given license string is a valid npm package license string, which can be an SPDX license expression. It is similar to spdx-correct in that it deals with license validation, but it does not correct invalid identifiers.
FAQs
correct invalid SPDX expressions
The npm package spdx-correct receives a total of 24,232,978 weekly downloads. As such, spdx-correct popularity was classified as popular.
We found that spdx-correct demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.