node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »


CircleCI npm version

Javascript ToggleAPI Client

A javascript client library for ToggleAPI.


This package provides a node compatible CommonJS build in the root and a concatenated UMD build in bundles/.

This package provides typescript definitions.

All examples are in ES6.

import { UserToggles } from 'toggle-api';
// (host, credentials, user_id, [anonymous], [app_version])
toggle = new UserToggles('', 'server-api-key', 'userId', '2.0.1', false);
toggle.load().then(() => {
    // (toggle_id, default_value)
    if (toggle.getToggle('my-toggle', false)) {
    } else {


This project can be built using: npm run build


This project can be tested using: npm run test