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

@eppo/js-client-sdk-common

Package Overview
Dependencies
Maintainers
5
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eppo/js-client-sdk-common - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

14

dist/client/eppo-client.d.ts

@@ -20,2 +20,14 @@ import { IAssignmentHooks } from '../assignment-hooks';

getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: Record<string, any>): string;
/**
* Asynchronously maps a subject to a variation for a given experiment, with pre and post assignment hooks
*
* @param subjectKey an identifier of the experiment subject, for example a user ID.
* @param experimentKey experiment identifier
* @param assignmentHooks interface for pre and post assignment hooks
* @param subjectAttributes optional attributes associated with the subject, for example name and email.
* The subject attributes are used for evaluating any targeting rules tied to the experiment.
* @returns a variation value if the subject is part of the experiment sample, otherwise null
* @public
*/
getAssignmentWithHooks(subjectKey: string, experimentKey: string, assignmentHooks: IAssignmentHooks, subjectAttributes?: Record<string, any>): Promise<string>;
}

@@ -28,3 +40,3 @@ export default class EppoClient implements IEppoClient {

getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: {}): string;
getAssignmentWithHooks(subjectKey: string, experimentKey: string, subjectAttributes: {}, assignmentHooks: IAssignmentHooks): Promise<string>;
getAssignmentWithHooks(subjectKey: string, experimentKey: string, assignmentHooks: IAssignmentHooks, subjectAttributes?: {}): Promise<string>;
setLogger(logger: IAssignmentLogger): void;

@@ -31,0 +43,0 @@ private flushQueuedEvents;

2

dist/client/eppo-client.js

@@ -41,3 +41,3 @@ "use strict";

}
async getAssignmentWithHooks(subjectKey, experimentKey, subjectAttributes = {}, assignmentHooks) {
async getAssignmentWithHooks(subjectKey, experimentKey, assignmentHooks, subjectAttributes = {}) {
let assignment = await (assignmentHooks === null || assignmentHooks === void 0 ? void 0 : assignmentHooks.onPreAssignment(subjectKey));

@@ -44,0 +44,0 @@ if (assignment == null) {

@@ -28,3 +28,3 @@ import { AxiosInstance } from 'axios';

getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: {}): string;
getAssignmentWithHooks(subjectKey: string, experimentKey: string, subjectAttributes: {}, assignmentHooks: IAssignmentHooks): Promise<string>;
getAssignmentWithHooks(subjectKey: string, experimentKey: string, assignmentHooks: IAssignmentHooks, subjectAttributes?: {}): Promise<string>;
setLogger(logger: IAssignmentLogger): void;

@@ -143,2 +143,14 @@ private flushQueuedEvents;

getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: Record<string, any>): string;
/**
* Asynchronously maps a subject to a variation for a given experiment, with pre and post assignment hooks
*
* @param subjectKey an identifier of the experiment subject, for example a user ID.
* @param experimentKey experiment identifier
* @param assignmentHooks interface for pre and post assignment hooks
* @param subjectAttributes optional attributes associated with the subject, for example name and email.
* The subject attributes are used for evaluating any targeting rules tied to the experiment.
* @returns a variation value if the subject is part of the experiment sample, otherwise null
* @public
*/
getAssignmentWithHooks(subjectKey: string, experimentKey: string, assignmentHooks: IAssignmentHooks, subjectAttributes?: Record<string, any>): Promise<string>;
}

@@ -145,0 +157,0 @@

{
"name": "@eppo/js-client-sdk-common",
"version": "1.2.1",
"version": "1.2.2",
"description": "Eppo SDK for client-side JavaScript applications (base for both web and react native)",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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