npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

evoleap-licensing

v0.7.108

Published

Client API for elm

Readme

evoleap-licensing

Client API for elm

This library includes code required to interact with evoleap license manager (https://elm.evoleap.com) for managing servers with users (usually web server applications)

Getting Started

After acquiring an elm login from evoleap, you can set up products. You will need:

  • A Product ID
  • One or more version numbers
  • A public key for your product

After a product is set up, you can set up licenses in the elm portal. Each license has a unique license key.

Registering a license

To use elm, first import the elm library:

const elm = require('evoleap-licensing');

or

import * as elm from 'evoleap-licensing';

Next, on server startup, register the elm server by calling:

function getDefaultServerState() {
	return {
		registered: false,
		registeredAt: '',
		failedRegistrationTimes: [],
		failedValidationTimes: [],
		featureGroups: [],
		features: [],
		firstLaunchTime: '',
		gracePeriodForValidationFailures: 0,
		instanceId: '',
		lastSuccessfulValidationTime: '',
		lastValidationStatus: 0,
	};
}

const emptyInstanceIdentity = {
	MaximumMismatchCount: 1,
	Values: new Map(),
	Version: 1,
};

const productId = '818FE2BC-6D57-4BF9-AB89-B94684FC1185';

const version = '1.0';

const publicKey = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyfhD/yW2quaZYHGeXOHQ
MAWxZ7QWLnKq9fs23LAd2ERTcAYRnz1GsLcTMUNHpdrUwsnzAduiw/DFPT9i0IOX
GQpCZcvfQO6YXAsNKna7Q1/3LVM6IHLyjAEdLWGF2USUENRIIOfkk5WyJxsHdXS9
jt+1Nt7z9KKZ1tpZS8ixxKH5Eaew/5y9D3XtP6H6nBXT7I7G7BMeAdJ2pfzfwAlD
kyRQs09qL/qK1DAyJKxS8GV6zLUMpoKBqy+7x5shO3SYIp+opUu7gnqYuWFS7K+n
UGdrrzUyRip2z4eLUj8TwmxXNVfn9Ci/TFW05eiIWd7NT8cTL5761BgJj2wbe0F2
HQIDAQAB
-----END PUBLIC KEY-----`;

const licenseKey = '02TRD-TYQZA-11DO4-238L6-91JOZ';

const licenseState = elm.server.getServerControlManager(
    productId,
    version,
    publicKey,
    getDefaultServerState(),
    elmPrefix
);

elm.hardware.addAllHardwareKeys(emptyInstanceIdentity)
    .then((instanceIdentity) => {
        elm.server.registerServer(
            licenseKey,
            licenseState,
            instanceIdentity
        ))
            .then((registrationResult) => {
				if (!registrationResult.success) {
					console.log(`Server registration was unsuccessful: ${registrationResult.message}`);
				} else {
					console.log('elm server registration successful!');
					// Updated state is in registrationResult.state

                    elm.server.validateInstance(registrationResult.state, instanceIdentity)
                        .then((instanceValidity) => {
                            if (!instanceValidity || !instanceValidity.isValid) {
                                if (!instanceValidity) {
                                    console.log('Server instance validation failed: unknown reason');
                                } else {
                                    console.log(`Server instance validation failed: ${elm.state.InvalidReason[instanceValidity.InvalidReason]}`);
                                }
                            } else {
                                console.log('elm server instance valid!');
                            }
                        })
                        .catch((err) => {
                            console.log(`Licensing error validating instance ${err}`);
                        });
                }
            })
            .catch((err) => {
                console.log(`Licensing error registering instance ${err}`);
            });
    })
    .catch((err) => {
        console.log(`Licensing error adding hardware keys ${err}`);
    });