spdx-license-list
List of SPDX licenses
Last updated a year ago by sindresorhus .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install spdx-license-list 
SYNC missed versions from official npm registry.

spdx-license-list

List of SPDX licenses

The lists of licenses are just JSON files and can be used anywhere.

Using SPDX License List version 3.22 (2023-10-05)

Install

npm install spdx-license-list

Usage

const spdxLicenseList = require('spdx-license-list');

console.log(spdxLicenseList.MIT);
/*
{
	name: 'MIT License',
	url: 'http://www.opensource.org/licenses/MIT',
	osiApproved: true
}
*/
const mitLicense = require('spdx-license-list/licenses/MIT');

console.log(mitLicense.licenseText);
//=> 'MIT License\r\n\r\nCopyright (c) <year> <copyright holders> …'

You can also get a version with the licence text included:

const spdxLicenseList = require('spdx-license-list/full');

console.log(spdxLicenseList.MIT);
/*
{
	name: 'MIT License',
	url: 'http://www.opensource.org/licenses/MIT',
	osiApproved: true,
	licenseText: '…'
}
*/

Or just the license IDs as a Set:

const spdxLicenseList = require('spdx-license-list/simple');

console.log(spdxLicenseList);
//=> Set {'Glide', 'Abstyles', …}

API

spdxLicenseList

Type: object

The licenses are indexed by their identifier and contains a name property with the full name of the license, url with the URL to the license, and osiApproved boolean for whether the license is OSI Approved.

Current Tags

  • 6.8.0                                ...           latest (a year ago)

18 Versions

  • 6.8.0                                ...           a year ago
  • 6.7.0                                ...           2 years ago
  • 6.6.0                                ...           3 years ago
  • 6.5.0                                ...           3 years ago
  • 6.4.0                                ...           4 years ago
  • 6.3.0                                ...           4 years ago
  • 6.2.0                                ...           5 years ago
  • 6.1.0                                ...           6 years ago
  • 6.0.0                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.1.0                                ...           7 years ago
  • 4.0.0                                ...           7 years ago
  • 3.0.1                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           10 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 18
This Month 18
Last Day 18
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (7)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |