# strongloop-license

> Validates StrongLoop licenses

Latest version **1.5.2** (published 2016-04-11) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

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

## 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.5.2 |
| Published | 2016-04-11 |
| First published | 2015-03-18 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | StrongLoop |
| Maintainers | bajtos, chandadharap, ibmcloud-admin, kraman, octet, rfeng, ritch, rmg, strongloop |
| Keywords | strongloop, license |

## Links

- npm: https://www.npmjs.com/package/strongloop-license
- Repository: https://github.com/strongloop/strongloop-license
- Homepage: https://strongloop.com
- Issues: https://github.com/strongloop/strongloop/issues
- npm.io page: https://npm.io/package/strongloop-license

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [user-home](https://npm.io/package/user-home.md) ^1.1.1
- [strong-license](https://npm.io/package/strong-license.md) ^1.2.0

## Recent versions

- 1.5.2 (latest) — 2016-04-11
- 1.5.1 — 2015-10-01
- 1.5.0 — 2015-09-16
- 1.4.0 — 2015-07-08
- 1.3.0 — 2015-06-08
- 1.2.0 — 2015-06-05
- 1.1.0 — 2015-05-01
- 1.0.4 — 2015-03-20
- 1.0.3 — 2015-03-19
- 1.0.2 — 2015-03-18
- 1.0.1 — 2015-03-18
- 1.0.0 — 2015-03-18

## README

strongloop-license
==================

Validates StrongLoop licenses.

## Usage

The simplest case is to declare a simple license requirement that takes the
default action if the license check fails.

### Examples

#### String Form
```js
require('strongloop-license')('some-product:some-feature=Special Sauce');
```

#### Options Form
```js
require('strongloop-license')({
  product: 'some-product',
  feature: 'some-feature',
  label: 'Special Sauce',
});
```

#### Exit On Failure
```js
require('strongloop-license')('core:feature', 'EXIT');
```

### API

#### module(opts, [callback])

* `opts`: an object or a string
  * string: a string of the format `product[:feature][=label]`
  * object: an object with the following properties:
    * `product`: product name
    * `feature`: feature name
    * `label`: friendly name for logs instead of product:feature
    * `now`: time to compare license against (defaults to `Date.now()`
    * `interval`: repeat license check ever `interval` ms (default to `0`, disabled)
* `callback`: function or String
  * function: `function(err, name, result)`
    * `result` is `false` or the license details of the matching license
  * string: name of builtin handler: `'NOOP'`, `'CONSOLE'`, `'EXIT'`

#### module.CONSOLE

Default handler, prints a message to stderr if a license match is not found or
a message to stdout stating when the license is valid.

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