Skip to content

invrs/variate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variate Build Status

Client-side multivariate testing.

Install

npm install variate

Usage

Variate uses the industry factory pattern:

import variate from "variate"

variate({
  cookie: {
    expires: 10 * 365,
    path:    "/",
    domain:  "site.com",
    secure:  true
  },
  tests: {
    banner: [ "short", "tall" ]
  },
  callback: ({ name, test, variant, converted }) => {
    // name - "banner"
    // test - [ "short", "tall" ]
    // variant - "short" or "tall"
    // converted - true or false
  }
})

// returns "short" or "tall"
//
variate().test({ name: "banner" })

// record conversion
//
variate().convert({ name: "banner" })

About

Client-side multivariate testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published