Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@ovyerus/licenses
Advanced tools
List of SPDX licenses with predictable placeholder strings for copyright info.
This is a fork of spdx-license-list with added placeholders in the copyright strings (of most of the licenses) to make it easy for machines to create licenses with user-given info.
Some licenses are skipped due to being overly specific for that particular product or company, however most generic, OSI-approved licenses should have them just fine.
(If you want to add support for a license that hasn't received placeholders yet, feel free to submit a PR 😃)
The lists of licenses are just JSON files and can be used anywhere.
Using SPDX License List version 3.8 (2020-02-09)
The placeholders in the text are in the format of <placeholder name>
, so for example, Copyright (c) 2002 John Doe
would become Copyright (c) <year> <author>
$ npm install @ovyerus/licenses
const spdxLicenseList = require('@ovyerus/licenses');
console.log(spdxLicenseList.MIT);
/*
{
name: 'MIT License',
url: 'http://www.opensource.org/licenses/MIT',
osiApproved: true
}
*/
const mitLicense = require('@ovyerus/licenses/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('@ovyerus/licenses/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('@ovyerus/licenses/simple');
console.log(spdxLicenseList);
//=> Set {'Glide', 'Abstyles', …}
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.
FAQs
List of SPDX licenses with predictable placeholders
The npm package @ovyerus/licenses receives a total of 307 weekly downloads. As such, @ovyerus/licenses popularity was classified as not popular.
We found that @ovyerus/licenses demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.