osi-license-checker
v1.5.2
Published
Checks whether a license is OSI-approved
Downloads
2
Readme
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