# is-spdx-license-id

> Check if the string is one of the SPDX license identifiers

Latest version **1.0.0** (published 2015-05-02) · 0 weekly downloads

## Install

```sh
npm install is-spdx-license-id
pnpm add is-spdx-license-id
yarn add is-spdx-license-id
bun add is-spdx-license-id
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-02 |
| First published | 2015-05-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | spdx, license, identifier, check, oss, browser, client-side |

## Links

- npm: https://www.npmjs.com/package/is-spdx-license-id
- Repository: https://github.com/shinnn/is-spdx-license-id.js
- Homepage: https://github.com/shinnn/is-spdx-license-id.js#readme
- Issues: https://github.com/shinnn/is-spdx-license-id.js/issues
- npm.io page: https://npm.io/package/is-spdx-license-id

## Dependencies (1)

- [spdx-license-ids](https://npm.io/package/spdx-license-ids.md) ^1.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-05-02
- 0.0.0 — 2015-05-02

## README

# is-spdx-license-id

[![NPM version](https://img.shields.io/npm/v/is-spdx-license-id.svg)](https://www.npmjs.com/package/is-spdx-license-id)
[![Bower version](https://img.shields.io/bower/v/is-spdx-license-id.svg)](https://github.com/shinnn/is-spdx-license-id.js/releases)
[![Build Status](https://travis-ci.org/shinnn/is-spdx-license-id.js.svg?branch=master)](https://travis-ci.org/shinnn/is-spdx-license-id.js)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-spdx-license-id.js.svg)](https://coveralls.io/r/shinnn/is-spdx-license-id.js)
[![Dependency Status](https://img.shields.io/david/shinnn/is-spdx-license-id.js.svg?label=deps)](https://david-dm.org/shinnn/is-spdx-license-id.js)
[![devDependency Status](https://img.shields.io/david/dev/shinnn/is-spdx-license-id.js.svg?label=devDeps)](https://david-dm.org/shinnn/is-spdx-license-id.js#info=devDependencies)

Check if the string is one of the [SPDX license](http://spdx.org/licenses/) identifiers

```javascript
isSpdxLicenseId('MIT'); //=> true
isSpdxLicenseId('zlib-acknowledgement'); //=> true

isSpdxLicenseId('foo-bar-baz'); //=> false
```

## Installation

### Package managers

#### [npm](https://www.npmjs.com/)

```sh
npm install is-spdx-license-id
```

#### [Bower](http://bower.io/)

```sh
bower install is-spdx-license-id
```

#### [Duo](http://duojs.org/)

```javascript
var isSpdxLicenseId = require('shinnn/is-spdx-license-id.js');
```

### Standalone

Download [the script file](https://raw.githubusercontent.com/shinnn/is-spdx-license-id.js/master/browser.js) and [its dependency](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids-browser.js).

## API

### isSpdxLicenseId(*string*)

*string*: `String`  
Return: `Boolean`

It returns `true` when the argument is one of the SPDX license identifiers, such as `'MIT'` and `'BSD-4-Clause'`. Otherwise it returns `false`.

## License

Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn)

Licensed under [the MIT License](./LICENSE).

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