Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rox-browser

Package Overview
Dependencies
Maintainers
5
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rox-browser

Rollout.io ROX JS SDK Client

  • 3.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7K
decreased by-31.97%
Maintainers
5
Weekly downloads
 
Created
Source

Rollout

Rollout is a Secure Feature Managment Solution for the Enterprise.

Accelerate development and minimize the risk of deploying new code with simple to create feature flags, controlled rollouts, advanced target groups & deployment rules.

Getting Started

Please see the detailed instructions in our docs how to add Rollout to your project.

Documentation

Getting started guide, use cases, examples and videos can be found at Rollout support site

Rollout Client JavaScript SDK 🦆

Rollout client JavaScript SDK for web applications. Define and use simple and advanced feature flags, remote configuration variables, static and computed custom properties in code. Control your application features via Rollout's dashboard.

Installation

npm i rox-browser --save

Usage

Obtain an application key by registering at Rollout.io.

import Rox from 'rox-browser';

const appSettingsContainer = {
  shouldShoWelcome: new Rox.Flag(),
  textColor: new Rox.Configuration('black')
};

const onRoxReady = () => {
  if (appSettingsContainer.shouldShoWelcome.isEnabled) {
    const color =  appSettingsContainer.textColor.value
    const div = document
      .createElement('div')
      .textContent('Hello world!')
      .setAttribute('style', `color: ${color}`);

    const body = document.getElementsByTagName('body')[0]
    body.appendChild(div)
  }
};

Rox.register('settingsNamespace', appSettingsContainer);
Rox.setup('<app key', {
  configurationFetchedHandler: onRoxReady
});

Configure the SDK with different options

Override the default configuration by prodiving predefined configuration preset for Rox.setup.

For example:

import Rox from 'rox-browser';

/*
- roxOptions.distinctId
- roxOptions.version
- roxOptions.syncComplitionHandler
*/

const roxOptions = {
  distinctId: 'sessionDistinctId',
  version: '1.0',
  configurationFetchedHandler: () => {}
};

Rox.setup('appKey', roxOptions);

Activating Manual Overrides UI

You can overide flags manually using a built-in UI debug utility that can be activated by invoking Rox.showOverrides().

Running it will display a UI element that allows to explicitly set values of flags. Available UI location of the UI element:

  • 'top left'
  • 'top right'
  • 'bottom left'
  • 'bottom right' (default)

LICENSE

Rollout client JavaScript SDK is free-to-use, proprietary software. Please see the full license found under the LICENSE file for more details.

Feedback

Feedback is always welcomed support@rollout.io

Keywords

FAQs

Package last updated on 04 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc