has-license
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.1 • Public • Published

    has-license

    Check if a repository has a license

    Can check both local- and GitHub repositories.

    Installation

    $ npm install has-license
    

    Usage

    const hasLicense = require('has-license');
    
    hasLicense('C:/Users/Knut/Documents/GitHub/btc-value-cli').then(result => {
        console.log(result);
        // => true
    });
    
    hasLicense('https://github.com/knutkirkhorn/has-license').then(result => {
        console.log(result);
        // => true
    });

    API

    hasLicense(path)

    Returns true if the path has a license file in it. Otherwise it returns false.

    If the path contains github.com it checks if the GitHub repository has a license.

    Related

    License

    MIT © Knut Kirkhorn

    Install

    npm i has-license

    DownloadsWeekly Downloads

    2

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    4.59 kB

    Total Files

    5

    Last publish

    Collaborators

    • knutkirkhorn