2.0.0 • Published 1 year ago

has-license v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

has-license

Check if a repository has a license

Can check both local- and GitHub repositories.

Installation

npm install has-license

Usage

import hasLicense from 'has-license';

console.log(await hasLicense('C:/Users/Knut/Documents/GitHub/btc-value-cli'));
// => true

console.log(await hasLicense('https://github.com/knutkirkhorn/has-license'));
// => 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

2.0.0

1 year ago

1.2.1

2 years ago

1.2.0

3 years ago

1.1.2

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago