Socket
Socket
Sign inDemoInstall

ab-tester

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ab-tester

create A/B Test instance without handle,you can get the key of A or B then process with the result simply


Version published
Weekly downloads
2
Maintainers
1
Install size
13.4 kB
Created
Weekly downloads
 

Readme

Source

ab-test

get A/B result quickly with node or browser

install

npm install ab-tester

start

import AB from 'ab-tester';

// create one group for A/B
AB.create('home',{
  'wide':0.3,
  'normal':0.7
});

// create anothor group for A/B
AB.create('video',{
  'wide':0.1,
  'normal':0.9
});

// get current key of hit within group by name
console.log(AB.run('home'));//normal

notice

sum of all items can be any number not must equal 1; the reuslt appear by rate of every item;

Keywords

FAQs

Last updated on 11 Apr 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc