Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couillard

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couillard - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

34

index.js

@@ -37,22 +37,22 @@ ;(() => {

module.exports = {
aim: (n, all = 0, va = [], cb) => {
if (!n) return
S.e(pr + n) ||
(cb && cb({ experiment: n, allocation: all, variants: va, anonymousId: S.g(anon)[0] }),
S.s(
pr + n,
+(Math.random() * 100 < all) + ',' + va[Math.floor(Math.random() * 10) % va.length]
))
aim: (n, a = 0, cb, vrs) => {
if (!n) return np
if (!S.e(pr + n)) {
let vs = Object.keys(vrs),
s = +(Math.random() * 100 < a),
v = vs[Math.floor(Math.random() * 10) % vs.length]
cb &&
cb({ experiment: n, allocation: a, variant: v, variants: vs, anonymousId: S.g(anon)[0] })
S.s(pr + n, s + ',' + v)
}
let [s, v] = S.g(pr + n)
return s > 0 ? vrs[v] : vrs.default || np
},
launch: (n, variant, cb, comp) => {
exp = pr + n
if (!S.e(exp)) return np
let [s, v] = S.g(exp)
let run = s > 0 && variant == v
run && cb && cb({ experiment: n, variant, anonymousId: S.g(anon)[0] })
return run ? comp : np
launch: (n, cb) => {
if (!S.e(pr + n)) return
let [s, v] = S.g(pr + n)
return s > 0 && cb && cb({ experiment: n, variant: v, anonymousId: S.g(anon)[0] })
},
hit: (e, cb) => () =>
cb && cb({ experiment: e, variant: S.g(pr + e)[1], anonymousId: S.g(anon)[0] })
hit: (n, cb) => cb && cb({ experiment: n, variant: S.g(pr + n)[1], anonymousId: S.g(anon)[0] })
}
})()
{
"name": "couillard",
"version": "0.0.12",
"version": "0.0.13",
"description": "Couillard is a small trebuchet, you aim, and launch at your users.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc