0.0.6 • Published 8 years ago

toggle-api v0.0.6

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

CircleCI npm version

Javascript ToggleAPI Client

A javascript client library for ToggleAPI.

Usage

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('http://api.toggleapi.com', 'server-api-key', 'userId', '2.0.1', false);

toggle.load().then(() => {
    // (toggle_id, default_value)
    if (toggle.getToggle('my-toggle', false)) {
        console.log('Enabled!');
    } else {
        console.log('Disabled!');
    }
});

Build

This project can be built using: npm run build

Test

This project can be tested using: npm run test

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago

0.1.0

8 years ago