Nodular Pudding Multiverse

    spdx-license

    1.0.2 • Public • Published

    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


    Related Packages:

    Install

    npm i spdx-license

    DownloadsWeekly Downloads

    108

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.79 kB

    Total Files

    10

    Last publish

    Collaborators

    • bconnorwhite