osi-license-checker

Answers the question: "Is this License an approved license by OSI?"

MIT License

Downloads
7
Stars
0
Committers
2

osi-license-checker

Answers the question: "Is this License an approved license by OSI?"

Based heavily on https://github.com/myrne/osi-licenses.

Setup

Just install it:

npm i osi-license-checker
yarn add osi-license-checker

Usage

checkForShorthand()

Checks whether the provided string is an exact match to an SPDX License Identifier.

import { checkShorthand } from 'osi-license-checker';

console.log(checkShorthand("MIT")); // => true
console.log(checkShorthand("Proprietary")); // => false

checkFullName()

Checks whether the provided string is an exact match to a full name of an OSI-approved license.

import { checkFullName } from 'osi-license-checker';

console.log(checkFullName("MIT")); // => false
console.log(checkFullName("MIT License")); // => true

Alternatives

Package Rankings
Top 20.62% on Npmjs.org