Answers the question: "Is this License an approved license by OSI?"
MIT License
Answers the question: "Is this License an approved license by OSI?"
Based heavily on https://github.com/myrne/osi-licenses.
Just install it:
npm i osi-license-checker
yarn add osi-license-checker
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