{"_id":"dice-roll","_rev":"19-7a72df60c2b5205d2f16a9c43422fd60","name":"dice-roll","description":"A JavaScript A/B test library","dist-tags":{"latest":"2.1.0"},"versions":{"0.0.1":{"name":"dice-roll","description":"A basic A/B test library","version":"0.0.1","homepage":"https://github.com/jgallen23/dice-roll","authors":["Greg Allen, @jgaui"],"repository":{"type":"git","url":"git://github.com/jgallen23/dice-roll.git"},"dependencies":{"cookie-monster":"*"},"main":"./dist/dice-roll.js","keywords":["ender","testing","ab"],"_npmJsonOpts":{"file":"/Users/jga/.npm/dice-roll/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"dice-roll@0.0.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.20","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"e93c1c5be38a51a859577a33da02bd831f7f2cd5","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-0.0.1.tgz","integrity":"sha512-jZcwyocvy/ZmCa3x3EpFEJJXPAHmVpGy9fwVyqqzyfBOS/Pj6d2/J2RAYmZwEXWd0kfn05i2ossqa0r/nPNE0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwWx0hnu2OQ1SJI+orJ4QHPi0HY0bc4eOdbXa/5tbF5wIgTbMwzvkT3ITK8o4QVREnI2yeH6sRFI17f00kBbYN9U0="}]},"scripts":{},"maintainers":[{"name":"jga","email":"me@jga.me"}],"directories":{}},"0.0.2":{"name":"dice-roll","description":"A basic A/B test library","version":"0.0.2","homepage":"https://github.com/jgallen23/dice-roll","authors":["Greg Allen, @jgaui"],"repository":{"type":"git","url":"git://github.com/jgallen23/dice-roll.git"},"dependencies":{"cookie-monster":"*"},"main":"./dist/dice-roll.js","keywords":["ender","testing","ab"],"_npmJsonOpts":{"file":"/Users/jga/.npm/dice-roll/0.0.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"dice-roll@0.0.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.20","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"7a2eb39a41f07097e19d0ac8d14d20675d757b52","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-0.0.2.tgz","integrity":"sha512-vogzCP7t8X4ElQyoyWw7gxnf0jsmtRDW0fnEICJjZwELbiNaVkSMux9zM7262Wsz+yV3RC99isKTZ2cyQ9cWUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvdjHnxL+OW/h2nDnbAVSANknSYcWxvZDMJFEJmlR27AiB2W4OzulBnnnLVtYgdbKWjODlMmVR8NTzUEHdfumyEvg=="}]},"scripts":{},"maintainers":[{"name":"jga","email":"me@jga.me"}],"directories":{}},"0.0.4":{"name":"dice-roll","description":"A basic A/B test library","version":"0.0.4","homepage":"https://github.com/jgallen23/dice-roll","author":{"name":"Greg Allen","email":"@jgaui","url":"http://jga.me"},"repository":{"type":"git","url":"git://github.com/jgallen23/dice-roll.git"},"dependencies":{"cookie-monster":"*"},"devDependencies":{"mocha":"*","chai":"*"},"main":"./dist/dice-roll.js","keywords":["ender","testing","ab"],"_npmUser":{"name":"jga","email":"me@jga.me"},"_id":"dice-roll@0.0.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"8cea58fc3bba225721f29347bbc0996777e25d4d","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-0.0.4.tgz","integrity":"sha512-kExtiDM5twS6wQ/GNrMoE9qiKOAmNE8QcuVTNzxikTPmio/TqVpU+2l5HVH3/DS0jd1u+YaDBlxNp68yXYfqXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDILKXO6SyflPiIh4d+RuVxbpV3hBdwJixNFHYMxjIG7wIgFABtPWQiIyiuW+84asqKIk+c1OhKSGcdDuowobqOTG8="}]},"maintainers":[{"name":"jga","email":"me@jga.me"}],"directories":{}},"1.0.0":{"name":"dice-roll","version":"1.0.0","description":"A JavaScript A/B test library","main":"dist/dice-roll.js","module":"index.js","keywords":["dice-roll","conversion"],"scripts":{"start":"scriptkit","build":"scriptkit build","dev":"scriptkit dev","test":"cat test/dice-roll.test.dist.js | tape-run --static . --browser phantomjs --render tap-spec","prepublish":"scriptkit"},"repository":{"type":"git","url":"git+https://github.com/firstandthird/dice-roll.git"},"author":{"name":"First+Third"},"license":"MIT","bugs":{"url":"https://github.com/firstandthird/dice-roll/issues"},"homepage":"https://github.com/firstandthird/dice-roll#readme","devDependencies":{"eslint-config-firstandthird":"3.2.0","eslint-plugin-import":"2.2.0","phantomjs-prebuilt":"2.1.14","scriptkit":"0.2.0","tap-spec":"4.1.1","tape-rollup":"4.6.4","tape-run":"3.0.0"},"eslintConfig":{"env":{"browser":true},"extends":"firstandthird"},"scriptkit":{"files":{"dist/dice-roll.js":"index.js","test/dice-roll.test.dist.js":"test/dice-roll.test.js"},"scripts":{"babel":{"exclude":["node_modules/tape-rollup/*"]}}},"dependencies":{"@firstandthird/cookie-monster":"^2.0.0"},"gitHead":"229221240d11148e14c8528e366ca90dc47ac0a6","_id":"dice-roll@1.0.0","_shasum":"c8af1377c2f2221e490ca08f28480a7e6442f2d8","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.10.0","_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"dist":{"shasum":"c8af1377c2f2221e490ca08f28480a7e6442f2d8","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-1.0.0.tgz","integrity":"sha512-735262XbZ+/ifKKA8RBlAxh9dFQi3pRI8oIQUTipTMuCAUeA3dK9QoVUQ2o/ZHH/N6cl1v33WdU0E1hC+G9r8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1v9kNErO/ER0kcHOqKL8GmfHO9+7XKU2amfy9hvHjKgIhAIgBzJnHYjOG9DmNYb45lcytwYg+Q+KoBuq+giKfAX7R"}]},"maintainers":[{"name":"jga","email":"me@jga.me"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dice-roll-1.0.0.tgz_1493186027079_0.41106151579879224"},"directories":{}},"2.0.0":{"name":"dice-roll","version":"2.0.0","description":"A JavaScript A/B test library","main":"index.js","module":"dist/dice-roll.esm.js","keywords":["dice-roll","conversion"],"scripts":{"start":"scriptkit","build":"scriptkit build","dev":"scriptkit dev","pretest":"scriptkit build","test":"cat test/dice-roll.test.dist.js | tape-run --static . --browser phantomjs --render tap-spec","prepublishOnly":"scriptkit"},"repository":{"type":"git","url":"git+https://github.com/firstandthird/dice-roll.git"},"author":{"name":"First+Third"},"license":"MIT","bugs":{"url":"https://github.com/firstandthird/dice-roll/issues"},"homepage":"https://github.com/firstandthird/dice-roll#readme","devDependencies":{"eslint-config-firstandthird":"^4.3.0","eslint-plugin-import":"^2.16.0","phantomjs-prebuilt":"^2.1.16","scriptkit":"^2.0.3","tap-spec":"^5.0.0","tape-rollup":"^4.6.4","tape-run":"^5.0.0"},"eslintConfig":{"env":{"browser":true},"extends":"firstandthird"},"scriptkit":{"files":{"dist/dice-roll.js":"index.js","test/dice-roll.test.dist.js":"test/dice-roll.test.js"},"scripts":{"babel":{"exclude":["node_modules/tape-rollup/*"]}}},"dependencies":{"@firstandthird/cookie-monster":"^2.0.0"},"gitHead":"f5697134a32516e9b58e2244744cfb56b0d13444","_id":"dice-roll@2.0.0","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-QHUyMbgbgBdEMa0GOh1zUc6NJO7qEo8UUMFqIDGL2pL7Kpc+ul+bzfLXyrTYpRyPIgRMhmxweZ2W8DufTr3+jw==","shasum":"ab918a2c55e15c7170d4f32e4b15f9edae42ff59","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-2.0.0.tgz","fileCount":6,"unpackedSize":15692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsJ+GCRA9TVsSAnZWagAAz7sP/Alp413f6v96VeU90I4Z\nhisU3JqEG9v4FOUBdllA9qGvOvBcgSWozhfzhUsjMlgIn//jwxvKTbmxRVbb\nUllZLhWYvZtF8Dapm8YBYjipAL8LUL9nnnqODkHmfHV6CivBhRvV5oS/ijBu\nrOw9Xtu8rUcLrktfFw5g8nhiAP+xcpqyepASX+ebNN2gNZTvkfjPAky/IrpQ\nBn4QKEl850nJOiNZncnY0nQ/oV1rDTNiz6FToJlr+QTSzWHJWLfbBxUgg65N\n/QaR7IhPyJiWh3eWq+/emUQP7VQGApMklxkqO3MAhcm3BY/iQGzNa/UaeTTY\nqi3N+Qp7ermAF5PArYtk+y5nzHNklyd3yqMuC0d+nNUFNqR/EPh9GUi5ZZgO\n8W3r6XCm+zpP6Py+TG7WlKbxStgXWdk313PWbB9Xt0PgOfP6V+5lEARYa88k\n5NLJk9sDykRgLSMLA87c7XfcHXSfvrOKMO/ckzJ9XE+IC1GQEmQjV+dF9Hcp\nQgMlIlchuTRebIY7t2lD8Lrrfy8dMDfVhL0w5Ty6Ut76QxH4PK9ZAFaXnlwI\nj9nCToSE4E/syW92wRafW9EtkREpXWNT2kUWwhBP4s8Bfno5m4JlvUlfZiGa\n/K0DQlXdm7QsWapLy05lPkScUJfVXppq7E2dmYZb0I+f7ZLxC0AGK13pmhM1\nezqo\r\n=wiGC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFm5c8LizodB8rM0zv7a3mLyYkJSRHvmI2haRaumpjvAiEAmz43Dpwf5ISDa+lZ+gEQj5Aeic/eVnKTq53RxdKsFcU="}]},"maintainers":[{"email":"sombragriselros@gmail.com","name":"alaguna"},{"email":"aleperez92@gmail.com","name":"aleperez92"},{"email":"troy@somany.us","name":"dawnerd"},{"email":"eric@ecwillis.com","name":"ecwillis"},{"email":"code@firstandthird.com","name":"jga"},{"email":"orthagonal1@gmail.com","name":"orthagonal1"}],"_npmUser":{"name":"aleperez92","email":"aleperez92@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dice-roll_2.0.0_1555079045948_0.3134947133245649"},"_hasShrinkwrap":false},"2.1.0":{"name":"dice-roll","version":"2.1.0","description":"A JavaScript A/B test library","main":"index.js","module":"dist/dice-roll.js","keywords":["dice-roll","conversion"],"scripts":{"start":"scriptkit","build":"scriptkit build","dev":"scriptkit dev","pretest":"scriptkit build","test":"cat test/dice-roll.test.dist.bundle.js | tape-run --static . --browser phantomjs --render tap-spec","prepublishOnly":"scriptkit"},"repository":{"type":"git","url":"git+https://github.com/firstandthird/dice-roll.git"},"author":{"name":"First+Third"},"license":"MIT","bugs":{"url":"https://github.com/firstandthird/dice-roll/issues"},"homepage":"https://github.com/firstandthird/dice-roll#readme","devDependencies":{"eslint-config-firstandthird":"^4.4.0","eslint-plugin-import":"^2.18.0","phantomjs-prebuilt":"^2.1.16","scriptkit":"^3.0.0","tap-spec":"^5.0.0","tape-rollup":"^4.6.4","tape-run":"^6.0.0"},"eslintConfig":{"env":{"browser":true},"extends":"firstandthird"},"scriptkit":{"files":{"dist/dice-roll.js":"index.js","test/dice-roll.test.dist.js":"test/dice-roll.test.js"},"scripts":{"babel":{"exclude":["node_modules/tape-rollup/*"]}}},"dependencies":{"@firstandthird/cookie-monster":"^3.1.0"},"gitHead":"aa7704f019dacd5df0a7a77f978790e397e8adc1","_id":"dice-roll@2.1.0","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+m7slqX7BCSLRUyU2DLp7IV0jpI3GsQoRIApWbaPGjSJR4MJRZNP+sfR9nzeLzVZ+8MkJkx8H63iz6Hz/5ACTQ==","shasum":"57eb459ed44ae3085b70f714792ff83c81964c18","tarball":"https://registry.npmjs.org/dice-roll/-/dice-roll-2.1.0.tgz","fileCount":6,"unpackedSize":11207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHH0iCRA9TVsSAnZWagAAUu4P/1rpyYPzE3b1/yVdNTE4\nUXp2+vYBzmftqivp8hHJp4KV3x9XLqJcy0li9qXaaLCsx9YeBc4dJaN6eV6D\nvaMoxSpvB/ZIjsDwfXmKc4DV5C+0YzZCpUSpWaT3fYAqY8ZBBT92JDrwWNII\n02qjWz+Yr10rtmCtOaEaqP+CK68OaDMqEYSxf28nM60/Psk9l3YDObIL4AJX\nvnHuRglLyRaUOzJo6sOOn/k9sjydOn3phCYppVTt5nhaZRXIJw4p9yJa/sB8\nomfkZvIRQ2NXGex7pY3expKB7QaZLin+2DGka7HhDfQQOhl3Zfy3Td4WoQE2\nCkr5OeZJic26xxgGTHF4gTgBxZKdiFTKlQgsLAZ5oFYCp/hyMoBKukozWXo1\nghpJmcAXZs44nn3BiQo+lz6OPnBpVI0L+oBi+tedcc8qjYzSBJ7ya3UCJ5kt\n0cgTSsAi2k0iTVH7VXK2cqDXOZ0gRUmoAMFKVUJvH8BXq62Zv4dCO6e2nC2h\nadK4npcdgu36q4Bam/CQk3PpNi9mjv7iRrhlUH7G9cq8fyp6fEOVYvu+XNpb\nXmk+tOoVhV9ROpUj6vI8h/WJbdM6+j57V6U3++XhkMAGlPsFi58ccK5PVeIN\nyyJO1XUY2DnbqK7OYsIfdJIUR1mFkTWdsZZ4/Yc5NR5PpIvbaNoES6ljC+A8\nVzqL\r\n=5iV8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2pVL2hB4k4FVE0QLJ80fCyQGzBKhaHIrTNhp/OM/UVwIhALHNT99NdSil4J5fxbGUtgfAYpxSx5UEyqnki0z2Y94Z"}]},"maintainers":[{"email":"sombragriselros@gmail.com","name":"alaguna"},{"email":"aleperez92@gmail.com","name":"aleperez92"},{"email":"troy@somany.us","name":"dawnerd"},{"email":"eric@ecwillis.com","name":"ecwillis"},{"email":"code@firstandthird.com","name":"jga"},{"email":"orthagonal1@gmail.com","name":"orthagonal1"}],"_npmUser":{"name":"aleperez92","email":"aleperez92@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dice-roll_2.1.0_1562148129559_0.10302333948939846"},"_hasShrinkwrap":false}},"maintainers":[{"email":"sombragriselros@gmail.com","name":"alaguna"},{"email":"aleperez92@gmail.com","name":"aleperez92"},{"email":"troy@somany.us","name":"dawnerd"},{"email":"eric@ecwillis.com","name":"ecwillis"},{"email":"code@firstandthird.com","name":"jga"},{"email":"orthagonal1@gmail.com","name":"orthagonal1"}],"time":{"modified":"2022-06-15T03:21:24.902Z","created":"2011-10-14T18:09:35.772Z","0.0.1":"2011-10-14T18:09:36.426Z","0.0.2":"2011-10-14T21:13:41.129Z","0.0.4":"2012-01-26T05:26:23.868Z","1.0.0":"2017-04-26T05:53:47.985Z","2.0.0":"2019-04-12T14:24:06.105Z","2.1.0":"2019-07-03T10:02:09.737Z"},"repository":{"type":"git","url":"git+https://github.com/firstandthird/dice-roll.git"},"author":{"name":"First+Third"},"readme":"# Dice Roll\n\n[![Build Status](https://travis-ci.org/firstandthird/dice-roll.svg?branch=master)](https://travis-ci.org/firstandthird/dice-roll)\n![npm](https://img.shields.io/npm/v/dice-roll.svg)\n\nA simple A/B test library for JavaScript\n\n## Features\n\n- Pass in any percentage to test\n- Will cookie user so they stay in the test when they come back (requires: [cookie-monster](https://github.com/firstandthird/cookie-monster))\n- Get a callback that tells you whether the user is in the test or not\n\n## Installation\n\n```sh\nnpm install dice-roll\n```\n\n## Usage\n\n```js\n  diceRoll('testName', expiration) //jquery style chaining\n    .test(percentage, callback);\n    .test(percentage2, callback2);\n    .otherwise(callback3);\n    .run();\n```\n\n## Example\n\n```js\n  diceRoll('testName', 1) //cookied for 1 day\n    .test(10, function() {\n      //10% of the time user will be in this test\n    });\n    .test(20, function() {\n      //20% of the time user will be in this test\n    });\n    .otherwise(function() {\n      //called if not in either other test (70% of the time)\n    });\n    .run();\n```\n","homepage":"https://github.com/firstandthird/dice-roll#readme","keywords":["dice-roll","conversion"],"bugs":{"url":"https://github.com/firstandthird/dice-roll/issues"},"license":"MIT","readmeFilename":"README.md"}