# spdx-correct

> correct invalid SPDX expressions

Latest version **3.2.0** (published 2023-03-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install spdx-correct
pnpm add spdx-correct
yarn add spdx-correct
bun add spdx-correct
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2023-03-07 |
| First published | 2015-04-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | separate (@types/spdx-correct) |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 22.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Maintainers | kemitchell, taleinat |
| Keywords | SPDX, law, legal, license, metadata |

## Links

- npm: https://www.npmjs.com/package/spdx-correct
- Repository: https://github.com/jslicense/spdx-correct.js
- Homepage: https://github.com/jslicense/spdx-correct.js#readme
- Issues: https://github.com/jslicense/spdx-correct.js/issues
- npm.io page: https://npm.io/package/spdx-correct

## Dependencies (2)

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

## Recent versions

- 3.2.0 (latest) — 2023-03-07
- 3.1.1 — 2020-05-22
- 3.1.0 — 2018-12-06
- 3.0.2 — 2018-10-04
- 3.0.1 — 2018-09-27
- 3.0.0 — 2018-02-27
- 2.0.4 — 2017-07-31
- 2.0.3 — 2017-06-13
- 2.0.2 — 2017-06-07
- 2.0.1 — 2017-06-06
- 2.0.0 — 2017-02-14
- 1.0.2 — 2015-10-26
- 1.0.1 — 2015-08-23
- 1.0.0 — 2015-06-05
- 1.0.0-prerelease-4 — 2015-06-05
- … 3 more at https://npm.io/package/spdx-correct/versions

## README

## Usage

```javascript
var correct = require('spdx-correct')
var assert = require('assert')

assert.strictEqual(correct('mit'), 'MIT')

assert.strictEqual(correct('Apache 2'), 'Apache-2.0')

assert(correct('No idea what license') === null)

// disable upgrade option
assert(correct('GPL-3.0'), 'GPL-3.0-or-later')
assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0')
```

## Contributors

spdx-correct has benefited from the work of several contributors.
See [the GitHub repository](https://github.com/jslicense/spdx-correct.js/graphs/contributors)
for more information.

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