New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eppo/node-server-sdk

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eppo/node-server-sdk

Eppo node server SDK

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.2K
decreased by-3.77%
Maintainers
4
Weekly downloads
 
Created
Source

Eppo Server-Side SDK for Node.js

Getting Started

Install the Eppo SDK as a dependency of your application:

yarn add @eppo/node-server-sdk

Initialize the SDK client in your application code:

import * as EppoSdk from '@eppo/node-server-sdk';

const eppoClient = EppoSdk.init({ apiKey: 'YOUR_API_KEY' });

The client must be a singleton. The client instance stores assignment configurations in memory. The same client instance should be reused for the lifetime of your application. Do not generate a new instance on every request.

Use the shared client instance to assign subjects to variations

Pass a subject and experimentKey to the client assignment function:

const assignedVariation = client.getAssignment("<subject>", "<experimentKey>")

The subject argument can be any entity identifier (e.g. a user ID). The experimentKey argument is the identifier of your Eppo experiment.

The getAssignment function will return null if the experiment is not running or if the subject is not part of the experiment traffic allocation.

FAQs

Package last updated on 12 May 2022

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