NodeSecure Licenses conformance
NodeSecure licenses conformance.
Requirements
- Node.js v16 or higher
Getting Started
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
This repository is inspired by cutenode/conformance
$ npm i @nodesecure/licenses-conformance
# or
$ yarn add @nodesecure/licenses-conformance
Usage example
import conformance from "@nodesecure/licenses-conformance";
const mitLicense = licenseConformance("MIT");
/*
{
uniqueLicenseIds: ["MIT"],
spdxLicenseLinks: ["https://spdx.org/licenses/MIT.html#licenseText"],
spdx: {
osi: true,
fsf: true,
fsfAndOsi: true,
includesDeprecated: false
}
}
*/
const errorLicense = licenseConformance("notalicense");
/*
should throw an Error like
Passed license expression was not a valid license expression.
Error from spdx-expression-parse: Error: `u` at offset 0
*/
API
See TypeScript definition file.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Vincent Dhennin 💻 🐛 📖 |
Gentilhomme 💻 👀 🛡️ |
License
MIT This repository is inspired by cutenode/conformance