JSPM

spdx-license

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30
  • Score
    100M100P100Q119693F
  • License MIT

Get SPDX license information

Package Exports

  • spdx-license

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (spdx-license) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

spdx-license

npm typescript GitHub stars Twitter Follow

Get SPDX license information.

Uses cross-fetch-json to support usage in both brower and node.

Installation

yarn add spdx-license
npm install spdx-license

API

Types

import { getLicense, getLicenses, FullLicense, Licenses, License } from "spdx-license";

function getLicense(id: string): Promise<FullLicense | undefined>;

function getLicenses(): Promise<Licenses>;

type FullLicense = {
  id: string;
  name: string;
  url: string;
  isDeprecated: boolean;
  isOSIApproved: boolean;
  isFSFLibre?: boolean;
  text: string;
};

type Licenses = {
  [id: string]: License;
}

type License = {
  id: string;
  name: string;
  url: string;
  isDeprecated: boolean;
  isOSIApproved: boolean;
  isFSFLibre?: boolean;
  getText: () => Promise<string | undefined>;
}

Dependenciesdependencies


Dev DependenciesDavid


License license

MIT