# license-helper

> =======

Latest version **1.0.8-beta.1** (published 2022-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install license-helper
pnpm add license-helper
yarn add license-helper
bun add license-helper
```

Provides the command `generateLicense`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8-beta.1 |
| Published | 2022-05-29 |
| First published | 2017-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ronyang |
| Maintainers | ronyang |

## Links

- npm: https://www.npmjs.com/package/license-helper
- npm.io page: https://npm.io/package/license-helper

## Dependencies (2)

- [moment](https://npm.io/package/moment.md) ^2.29.1
- [@hapi/sntp](https://npm.io/package/@hapi/sntp.md) 4.0.0

## Recent versions

- 1.0.8-beta.1 (latest) — 2022-05-29
- 1.0.7-beta.3 — 2021-10-08
- 1.0.7-beta.2 — 2021-07-08
- 1.0.7-beta.1 — 2021-02-19
- 1.0.7 — 2019-06-08
- 1.0.5 — 2018-06-27
- 1.0.4-beta.4 — 2018-06-03
- 1.0.4-beta.3 — 2018-06-01
- 1.0.4-beta.2 — 2018-06-01
- 1.0.4-beta.1 — 2018-04-30
- 1.0.4 — 2017-11-16

## README

# license-checker
=======

features including:

+ generate license based on aes or rsa algorithm
+ load license and check expiration from ntp server

### Install

```
npm install cmdb-license-checker
```

### Usage

#### generate license

just place a license.json in root project

```
{
    //required fields
    "expiration":"2017-04-30",
    //any other fields
    "mac":""
}
```

run command

```
generateLicense
```

> `${projectName}.lic` will be generated,projectName is the name field from npm.json

or specify encryption algorithm by running

```
encryption_algorithm=aes generateLicense
```


#### load license

```
const license_checker = require('cmdb-license-checker')
//load license when initialized
let license = license_checker.load(`./${projectName}.lic`)
//get license and time any time on the fly
let license = license_checker.getLicense()
let now = license_checker.now()
```

### License

MIT

---
_Source: https://npm.io/package/license-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
