get-license-npm
Tries to find a license file.
If no license file given, tries to get license information from the
package.json
.
Adds repository url and path (for manual checks).
API
getLicense(pathToNodeModule, [optionalCallback])
returns a Promise which is resolved. If an oldschool callback is provided, the callback is called.
Example:
const getLicenseInfo = const modulePath = __dirname // callback based API // Promise based API // returns:/* { "license": "MIT", "licenseFile": "/Users/robert/projects/get-license-npm/LICENSE", "repo": "https://github.com/robertkowalski/get-license-npm", "private": false }*/
Contributing
get-license-npm
is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit- access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
More infos in CONTRIBUTING.md