What is spdx-license-ids?
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.
What are spdx-license-ids's main functionalities?
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);
Other packages similar to spdx-license-ids
spdx
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.
spdx-expression-parse
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.
spdx-correct
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.
license-checker
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.
spdx-license-ids
A list of SPDX license identifiers
Download JSON
Use as a JavaScript Library
Installation
Package managers
npm install spdx-license-ids
bower install spdx-license-ids
const spdxLicenseIds = require('shinnn/spdx-license-ids');
Standalone
Download the script file directly.
API
spdxLicenseIds
Type: Array
of String
It returns an array of SPDX license identifiers.
const spdxLicenseIds = require('spdx-license-ids');
License
The Unlicense.