# @ovyerus/licenses

> List of SPDX licenses with predictable placeholders

Latest version **6.4.4** (published 2020-02-23) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install @ovyerus/licenses
pnpm add @ovyerus/licenses
yarn add @ovyerus/licenses
bun add @ovyerus/licenses
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.4.4 |
| Published | 2020-02-23 |
| First published | 2020-01-23 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 7.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Ovyerus |
| Maintainers | ovyerus |
| Keywords | spdx, license, licenses, mit, bsd, list, open source, software, id, ids, identifiers, set |

## Links

- npm: https://www.npmjs.com/package/@ovyerus/licenses
- Repository: https://github.com/ovyerus/licenses
- npm.io page: https://npm.io/package/@ovyerus/licenses

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 6.4.4 (latest) — 2020-02-23
- 6.4.3 — 2020-02-23
- 6.4.2 — 2020-02-23
- 6.4.1 — 2020-02-23
- 6.4.0 — 2020-02-20
- 6.3.0 — 2020-02-20
- 6.2.2 — 2020-01-28
- 6.2.1-dev — 2020-01-28
- 6.2.1 — 2020-01-23
- 6.2.0 — 2020-01-23

## README

# licenses [![Build Status](https://travis-ci.org/Ovyerus/licenses.svg?branch=master)](https://travis-ci.org/Ovyerus/licenses)

> List of [SPDX licenses](https://spdx.org/licenses/) with predictable placeholder strings for copyright info.

This is a fork of [spdx-license-list](https://github.com/sindresorhus/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.

<small>(If you want to add support for a license that hasn't received placeholders yet, feel free to submit a PR 😃)</small>

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

- [spdx.json](spdx.json) contains just license metadata
- [spdx-full.json](spdx-full.json) includes the license text too
- [spdx-simple.json](spdx-simple.json) only contains the license IDs

_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>`

## Install

```
$ npm install @ovyerus/licenses
```

## Usage

```js
const spdxLicenseList = require('@ovyerus/licenses');

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

```js
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:

```js
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`:

```js
const spdxLicenseList = require('@ovyerus/licenses/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](https://opensource.org/licenses).

---
_Source: https://npm.io/package/@ovyerus/licenses · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
