Package Exports
- strongloop-license
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (strongloop-license) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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
require('strongloop-license')('some-product:some-feature=Special Sauce');Options Form
require('strongloop-license')({
product: 'some-product',
feature: 'some-feature',
label: 'Special Sauce',
});Exit On Failure
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 namefeature: feature namelabel: friendly name for logs instead of product:featurenow: time to compare license against (defaults toDate.now()interval: repeat license check everintervalms (default to0, disabled)
- string: a string of the format
callback: function or String- function:
function(err, name, result)resultisfalseor the license details of the matching license
- string: name of builtin handler:
'NOOP','CONSOLE','EXIT'
- function:
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.