wallet-core/node_modules/spdx-license-ids/README.md

53 lines
1.5 KiB
Markdown
Raw Normal View History

2016-10-10 03:43:44 +02:00
# spdx-license-ids
2018-09-20 02:56:13 +02:00
[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids)
2016-10-10 03:43:44 +02:00
[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids)
2018-09-20 02:56:13 +02:00
A list of [SPDX license](https://spdx.org/licenses/) identifiers
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
## Installation
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm):
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
```
2016-10-10 03:43:44 +02:00
npm install spdx-license-ids
```
2018-09-20 02:56:13 +02:00
## [Node.js](https://nodejs.org/) API
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
### require('spdx-license-ids')
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
Type: `<Array<string>>`
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
All license IDs except for the currently deprecated ones.
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
```javascript
const ids = require('spdx-license-ids');
//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', 'AFL-1.2', ...]
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
ids.includes('BSD-3-Clause'); //=> true
ids.includes('CC-BY-1.0'); //=> true
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
ids.includes('GPL-3.0'); //=> false
```
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
### require('spdx-license-ids/deprecated')
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
Type: `<Array<string>>`
2016-10-10 03:43:44 +02:00
2018-09-20 02:56:13 +02:00
Deprecated license IDs.
2016-10-10 03:43:44 +02:00
```javascript
2018-09-20 02:56:13 +02:00
const deprecatedIds = require('spdx-license-ids/deprecated');
//=> ['AGPL-1.0', 'AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...]
deprecatedIds.includes('BSD-3-Clause'); //=> false
deprecatedIds.includes('CC-BY-1.0'); //=> false
deprecatedIds.includes('GPL-3.0'); //=> true
2016-10-10 03:43:44 +02:00
```
## License
2018-09-20 02:56:13 +02:00
[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)