🚨 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.

latest
npmnpm
Version
0.3.1
Version published
Weekly downloads
57K
3.6%
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.

Development

Building

  • npm run compile - Compile TypeScript to JavaScript
  • npm run bundle - Bundle the package into a single file (output: out/bundle/tas-client.js)
  • npm run watch - Watch mode for TypeScript compilation
  • npm test - Run tests

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 04 Nov 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