sindresorhus/spdx-license-list


List of SPDX licenses

License: CC0-1.0

Language: JavaScript

Keywords: javascript, json, list, nodejs, spdx, spdx-licenses


spdx-license-list Build Status

List of SPDX licenses

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

Using SPDX License List version 3.6 (2019-07-10)

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.

Project Statistics

Sourcerank 13
Repository Size 2.75 MB
Stars 56
Forks 12
Watchers 10
Open issues 0
Dependencies 6
Contributors 6
Tags 11
Created
Last updated
Last pushed

Top Contributors See all

Sindre Sorhus Daniel Husar Mike Linksvayer Oliver Kopp Sebastian Schuberth Tiago Danin

Packages Referencing this Repo

spdx-license-list
List of SPDX licenses
Latest release 6.1.0 - Updated - 56 stars
spdx-license-list
List of SPDX licenses
Latest release v6.1.0 - Published - 56 stars

Recent Tags See all

v6.1.0 August 07, 2019
v6.0.0 March 27, 2019
v5.0.0 November 08, 2018
v4.1.0 July 19, 2018
v4.0.0 January 21, 2018
v3.0.1 March 15, 2017
v3.0.0 March 15, 2017
v2.1.0 October 02, 2015
v2.0.0 April 29, 2015
v1.1.0 August 17, 2014
v1.0.0 August 05, 2014

Something wrong with this page? Make a suggestion

Last synced: 2019-08-07 11:12:53 UTC

Login to resync this repository