🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

tas-client

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tas-client

This package is intended to be used as an endpoint client to query, refetch, and cache data from the Experimentation service (or any given endpoint). The endpoint result must follow the required structure for experimentation data.

npmnpm
Version
0.3.0
Version published
Weekly downloads
55K
-6.09%
Maintainers
3
Weekly downloads
 
Created
Source

tas-client

Purpose

This package is intended to be used as an endpoint client to query, refetch, and cache data from the Experimentation service (or any given endpoint). The endpoint result must follow the required structure for experimentation data.

Usage

First, your client should implement an IExperimentationFilterProvider, IExperimentationTelemetry, and IKeyValueStorage.

Next, they can be used in the TASClient constructor:

const tasClient = new TASClient({
			filterProviders: [filterProvider],
			telemetry: telemetry,
			storageKey: storageKey,
			keyValueStorage: keyValueStorage,
			assignmentContextTelemetryPropertyName: '<assignmentContextTelemetryPropertyName>',
			telemetryEventName: '<telemetryEventName>',
			endpoint: '<tas-endpoint>',
			refetchInterval: refetchInterval,
		});

The client provides a variety of functions, but the most basic is getTreatmentVariable(configId: string, name: string). Once you have an instance of IExperimentationService you can call getTreatmentVariable to get the value of a treatment variable.

NOTE: If you haven't awaited the IExperimentationService's initializePromise, you need to use getTreatmentVariableAsync.

Keywords

tas-client

FAQs

Package last updated on 25 Aug 2025

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