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

@splitsoftware/splitio

Package Overview
Dependencies
Maintainers
7
Versions
477
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitsoftware/splitio

Split SDK

  • 11.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
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

FAQs

Package last updated on 11 Nov 2024

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