You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@splitsoftware/splitio

Package Overview
Dependencies
Maintainers
2
Versions
501
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitsoftware/splitio

Split SDK

0.16.0
Source
npmnpm
Version published
Maintainers
2
Created

What is @splitsoftware/splitio?

@splitsoftware/splitio is a feature flagging and experimentation platform that allows you to manage feature rollouts, run A/B tests, and perform real-time analytics. It helps in delivering features to users in a controlled manner, enabling you to test and iterate quickly.

What are @splitsoftware/splitio's main functionalities?

Feature Flagging

This feature allows you to manage feature flags, enabling or disabling features for specific users or groups. The code sample demonstrates how to initialize the Split.io client and check the status of a feature flag for a user.

const splitio = require('@splitsoftware/splitio');
const factory = splitio({ core: { authorizationKey: 'YOUR_API_KEY' } });
const client = factory.client();

client.on(client.Event.SDK_READY, () => {
  const treatment = client.getTreatment('user123', 'feature_flag_name');
  if (treatment === 'on') {
    // Feature is enabled
  } else {
    // Feature is disabled
  }
});

A/B Testing

This feature allows you to run A/B tests by assigning different treatments (variants) to users. The code sample shows how to determine which variant a user should see based on the experiment configuration.

const splitio = require('@splitsoftware/splitio');
const factory = splitio({ core: { authorizationKey: 'YOUR_API_KEY' } });
const client = factory.client();

client.on(client.Event.SDK_READY, () => {
  const treatment = client.getTreatment('user123', 'experiment_name');
  if (treatment === 'variant_a') {
    // Show variant A
  } else if (treatment === 'variant_b') {
    // Show variant B
  }
});

Real-time Analytics

This feature allows you to track user events and conversions in real-time. The code sample demonstrates how to track a purchase event for a user, which can be used for analytics and reporting.

const splitio = require('@splitsoftware/splitio');
const factory = splitio({ core: { authorizationKey: 'YOUR_API_KEY' } });
const client = factory.client();

client.on(client.Event.SDK_READY, () => {
  client.track('user123', 'conversion', 'purchase', 100);
});

Other packages similar to @splitsoftware/splitio

Keywords

rollout

FAQs

Package last updated on 15 Feb 2016

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