3 [![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.com/package/spdx-license-ids)
4 [![Github Actions](https://action-badges.now.sh/shinnn/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/spdx-license-ids)
6 A list of [SPDX license](https://spdx.org/licenses/) identifiers
10 [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/about-npm/):
13 npm install spdx-license-ids
16 ## [Node.js](https://nodejs.org/) API
18 ### require('spdx-license-ids')
22 All license IDs except for the currently deprecated ones.
25 const ids = require('spdx-license-ids');
26 //=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...]
28 ids.includes('BSD-3-Clause'); //=> true
29 ids.includes('CC-BY-1.0'); //=> true
31 ids.includes('GPL-3.0'); //=> false
34 ### require('spdx-license-ids/deprecated')
38 Deprecated license IDs.
41 const deprecatedIds = require('spdx-license-ids/deprecated');
42 //=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...]
44 deprecatedIds.includes('BSD-3-Clause'); //=> false
45 deprecatedIds.includes('CC-BY-1.0'); //=> false
47 deprecatedIds.includes('GPL-3.0'); //=> true
52 [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)