Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
spdx-license-ids
Advanced tools
The spdx-license-ids package provides a list of SPDX license identifiers. SPDX (Software Package Data Exchange) is a standard format for communicating the licensing information of software packages. This package is useful for validating license identifiers, checking if a license ID is deprecated, and listing all valid SPDX license IDs.
List of all SPDX license IDs
This feature provides an array of all non-deprecated SPDX license identifiers. You can use this list to validate or display available licenses.
const spdxLicenseIds = require('spdx-license-ids');
console.log(spdxLicenseIds);
List of deprecated SPDX license IDs
This feature provides an array of deprecated SPDX license identifiers. It is useful for checking if a license ID is no longer valid according to the SPDX specification.
const spdxLicenseIdsDeprecated = require('spdx-license-ids/deprecated');
console.log(spdxLicenseIdsDeprecated);
The 'spdx' package offers functions to parse, validate, and compare SPDX expressions. It provides more comprehensive functionality compared to spdx-license-ids, which only lists license IDs.
This package is used to parse and validate SPDX license expressions. Unlike spdx-license-ids, which provides lists of license IDs, spdx-expression-parse can handle complex license expressions, including those with 'AND' and 'OR' operators.
The spdx-correct package is designed to correct invalid SPDX license IDs and expressions. It is more focused on error correction, while spdx-license-ids simply provides a list of valid and deprecated license IDs.
While spdx-license-ids provides SPDX license identifiers, license-checker is a tool that scans a project's dependencies for license information, which can then be compared against the list of licenses provided by spdx-license-ids.
A list of SPDX license identifiers
Download JSON directly, or use npm:
npm install spdx-license-ids
Type: <Array<string>>
All license IDs except for the currently deprecated ones.
const ids = require('spdx-license-ids');
//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', ...]
ids.includes('BSD-3-Clause'); //=> true
ids.includes('CC-BY-1.0'); //=> true
ids.includes('GPL-3.0'); //=> false
Type: <Array<string>>
Deprecated license IDs.
const deprecatedIds = require('spdx-license-ids/deprecated');
//=> ['AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...]
deprecatedIds.includes('BSD-3-Clause'); //=> false
deprecatedIds.includes('CC-BY-1.0'); //=> false
deprecatedIds.includes('GPL-3.0'); //=> true
FAQs
A list of SPDX license identifiers
The npm package spdx-license-ids receives a total of 15,963,450 weekly downloads. As such, spdx-license-ids popularity was classified as popular.
We found that spdx-license-ids demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.