Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@appannie/ab-testing
Advanced tools
AB testing library supporting multi-variance testing with a deterministic algorithm not requiring any complex backend or database.
AB testing library supporting multi-variance testing with a deterministic algorithm not requiring any complex backend or database.
The segmentation logic is maintained in the AB testing client and based itself on a centralized configuration. The cohort assignment logic is deterministic and follows a simple hash pattern based on the crc32c
algorithm (crc32c(userId, crc32c(experimentName)) % 100
)
npm install @appannie/ab-testing
# or
yarn add @appannie/ab-testing
Note: The configuration file format is documented here.
import { Experiments } from '@appannie/ab-testing';
const profile = {
persona: user.persona,
employee: user.isEmployee,
};
const experiments = new Experiments(config, user.id, profile);
const cohort = experiments.getCohort('experiment-name');
switch (cohort) {
case 'blue':
console.log('user in the blue cohort');
break;
case 'red':
console.log('user in the red cohort');
break;
// 'control' is the default cohort. All experiments have a control cohort.
case 'control':
default:
console.log('user in the control (default) cohort');
break;
}
Made with ❤️ by Zhang Tao and Simon Boudrias from the App Annie Beijing office.
Available for public use under the MIT license.
FAQs
<!-- TOC -->
The npm package @appannie/ab-testing receives a total of 66 weekly downloads. As such, @appannie/ab-testing popularity was classified as not popular.
We found that @appannie/ab-testing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.