{"_id":"reflip","_rev":"26-91060ad13545f7e4a1c3ff3e9914aa30","name":"reflip","description":"key-value-store-backed feature flipping middleware for connect/express.js","dist-tags":{"latest":"1.1.3"},"versions":{"0.0.1":{"name":"reflip","version":"0.0.1","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test-suites":"mocha -R spec test/*.js","test":"mocha -R spec test/*.js && mocha --require blanket -R travis-cov test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"latest","lodash":"latest","redis":"latest","hiredis":"latest"},"optionalDependencies":{"redis":"latest","hiredis":"latest"},"devDependencies":{"chai":"latest","mocha":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest"},"_id":"reflip@0.0.1","dist":{"shasum":"82cff8bae44b54ea2099ef2da485a29f5817cedc","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.0.1.tgz","integrity":"sha512-HhHH13Bp6pDJmBHqpBnCiRNU/+JzG+gLi4B8JnAgJMv0hOvtJSXtDorun30orZdK+amrxg8UwZfenKcVtWHsFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAufLMnsfQqvnBjVM/xnHAI0CNA0R+j32OVSx649NKRAiEAxBlpa8U3ZLuLz3cxiHXR0Rj2EQtNQKw3VfGcKjsOH5U="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.0.2":{"name":"reflip","version":"0.0.2","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.1","lodash":"~2.3.0","redis":"~0.9.0","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.0.2","dist":{"shasum":"0b9850db8c900fa6594e48c56412c223555abba4","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.0.2.tgz","integrity":"sha512-UEaqiC58szZImXjiCVvwCXmfkBvb+vuv5dUozx7RPoG9QfYn+dqJS8G3ZogIPlAdQd0ZSeLjDPEdSn0oLyzJkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWHh/6A/keNQtRq3+IQngkNadSy3HutVhTO2qFpXwfEAIhAPDbNZL2W1A0NYw5sP+Sy1syu6hlqF3zbZ96JdcNdAYY"}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.1.0":{"name":"reflip","version":"0.1.0","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.1","lodash":"~2.3.0","redis":"~0.9.0","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.1.0","dist":{"shasum":"a0e3c4e87af7d5ae6b3a44953de54ae5679e5792","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.1.0.tgz","integrity":"sha512-xmsxped0BzD6g815VPT5AeX+hFVIjDzH+vSksTRnDT085wC8QuQ9kJIrKzf6HgTIjIfViVptWnisWzOCEx2oHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExFsk96Pxzh08N0CGHTG49lA0V9DII4/P2yoiTiBp+PAiAWDiJ+w92QviQK1gG+pKjoorEJt8DwdI+sES1jVGbCTg=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.1.1":{"name":"reflip","version":"0.1.1","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.1","lodash":"~2.3.0","redis":"~0.9.0","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.1.1","dist":{"shasum":"c1f3782060e017c94ad4e8a0ffe5caf5e9ec97ca","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.1.1.tgz","integrity":"sha512-gNZoTmsDYVgrjsDr8mGTXtYoDuYls1/rd7QpA1Qd/9aBFFhU5owyznA/RdNyZfenVyjAwgyr3DcoUHoqLkWCMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGUCs7P5suJT+3vZjS/ZjyECHaj3AdiHxYzfGgJUdoTAiEA3cop2h9bMacAlSBgAL7N53zkd13m2rcgT5hvC4Ej6UY="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.1.2":{"name":"reflip","version":"0.1.2","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.9","lodash":"~2.4.0","redis":"~0.9.1","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.1.2","dist":{"shasum":"54cf445325a43673f7df91372138dbf825bc9494","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.1.2.tgz","integrity":"sha512-frFzao/2arV9kW0jkOSF3XGOcFn0jy2A/nN7uViyMIqymoOGzIEwVXVkung1yQHSHNvZsFfu0qseqMyRistgeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCs77/Qz2ZEU3r/Fwelr9lYij7ac+A5P9as6MlgVEFyegIgYviQc8pn9rS28SwfxKhQOHnktJPApOPUX/g4kQrI7kI="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.2.2":{"name":"reflip","version":"0.2.2","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.9","lodash":"~2.4.0","redis":"~0.9.1","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.2.2","dist":{"shasum":"1587943bd27e6e1abd395b86f034bf71c9345636","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.2.2.tgz","integrity":"sha512-YvM7dE81rcFNmUssyDwzt2GhdxVdAJ2PTZqYdoyWTblCflcLwFvG95xJbBQVUznCW7od91MoKMEXT63AYCsZig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDean82khtIMTp+9+SYNDEfvHqIT3lidl2E5Hrvn0YW7AiA29IbmcjgJAWhw6zcjusE9b0PzOs4L76/WGkHQqlYR0g=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.2.3":{"name":"reflip","version":"0.2.3","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~0.10.9","lodash":"~2.4.0","redis":"~0.9.1","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.2.3","dist":{"shasum":"b5559ede3208e2d551ba2b1ee34e909e86b25de2","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.2.3.tgz","integrity":"sha512-u/rdikV8uOAe+BQvDjiuIVhK/lhfVZn2hxIPVI2QLlKDItBwbjjGgrAePd8tmrP2z9oER8s6K0q5jXAh78IAOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAYDw7BF+hWa7nrBQ3IRaJP4VsEHyO2mtLL5y5MF7zyAIhAIuVTMSVl9reudm0faBp5Q0iOtBNfvsaploctPJxVUb4"}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"0.2.4":{"name":"reflip","version":"0.2.4","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"},"travis-cov":{"threshold":80}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"^1.0.1","lodash":"^2.4.0","redis":"^0.10.0","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@0.2.4","dist":{"shasum":"3fc9ceba73808a3b68fc08b0e14c3e5b533b4325","tarball":"https://registry.npmjs.org/reflip/-/reflip-0.2.4.tgz","integrity":"sha512-333daS1RarsQ40Kqnz1uLEx+oYLAp1iMsBqfJTkhufzBBv2yGDyVy57lsFIFPu+otIAgOEmo9wrpGT5iNYENdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICT2KiV3LQOPNVmRN54lnFzO3x2V5CQUx5hNz61/iKeqAiEA6RdvhwafAfh/ecv9SNYch86clPTWoeCTbShNt2QCFIQ="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"1.0.0":{"name":"reflip","version":"1.0.0","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"npm run test-suite && npm run coveralls && npm run test-cov","test-suite":"mocha -R spec test/*.js","test-cov":"mocha --require blanket -R travis-cov test/*.js","coveralls":"NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter test/*.js | ./node_modules/coveralls/bin/coveralls.js","coverage":"mocha --require blanket -R html-cov test/*.js > test/coverage.html"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"},"travis-cov":{"threshold":80}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"^1.0.1","lodash":"^2.4.0","redis":"^0.10.0","hiredis":"~0.1.15"},"optionalDependencies":{"hiredis":"~0.1.15"},"devDependencies":{"mocha":"latest","must":"latest","sinon":"latest","blanket":"latest","travis-cov":"latest","mocha-lcov-reporter":"latest","coveralls":"latest"},"homepage":"https://github.com/ceejbot/reflip","_id":"reflip@1.0.0","dist":{"shasum":"4ba8ba3319a4237b7bb1d842c5d14c9fc7eb30a0","tarball":"https://registry.npmjs.org/reflip/-/reflip-1.0.0.tgz","integrity":"sha512-Lg3OWeUrP9DMhlPLwRoPctHY1ya7MaPi27BaUBpp9RWtIBYJyNSZE3OvV1ayBZHdOBTjPAp9q6z0lQPChIzlgg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi1336tAygfbvEEeRccMVspakaB7Z3VZbe0HFgf8/yWgIgMLT7/BPR9T3OZDPXn22DIEMJfk8Fr4a3fVw0PCka7aU="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}]},"1.1.0":{"name":"reflip","version":"1.1.0","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"lab -v -c -t 90 test/*.js"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"^2.2.2","lodash":"^2.4.0","redis":"^0.11.0","hiredis":"^0.1.17"},"optionalDependencies":{"hiredis":"^0.1.17"},"devDependencies":{"lab":"latest","must":"latest","sinon":"latest"},"gitHead":"4bbee681cafc957c42bc1cd81db2f77e138b07b5","homepage":"https://github.com/ceejbot/reflip","_id":"reflip@1.1.0","_shasum":"3311a1f7a58452cc34eebe4b1af1dcc05fe78729","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}],"dist":{"shasum":"3311a1f7a58452cc34eebe4b1af1dcc05fe78729","tarball":"https://registry.npmjs.org/reflip/-/reflip-1.1.0.tgz","integrity":"sha512-IX9jFFUU6cAJkEQCPO1U51Dur7ki7nMTFnxZanhOwaSDpLuLd1g0U2gJxukh2MBh2YIDYcNRCj8zmGg3XSqoWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdxbXgTIqB72xInHtCcdkgVR3W2t6qpsGaxWFxMEy5DAiEAwEs8Q1d2A5wXmkZLOE8mFda4uj6LjpUmq2iIHZQffGw="}]}},"1.1.1":{"name":"reflip","version":"1.1.1","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"lab -v -c -t 90 test/*.js"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"^2.2.2","lodash":"^2.4.0","redis":"^0.11.0","hiredis":"^0.1.17"},"optionalDependencies":{"hiredis":"^0.1.17"},"devDependencies":{"lab":"latest","must":"latest","sinon":"latest"},"gitHead":"caf5058cc7af4034c693f15811b4a649475134ee","homepage":"https://github.com/ceejbot/reflip","_id":"reflip@1.1.1","_shasum":"b261df16c5777b8c40b5cb088dfb159d4c7d3eb5","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}],"dist":{"shasum":"b261df16c5777b8c40b5cb088dfb159d4c7d3eb5","tarball":"https://registry.npmjs.org/reflip/-/reflip-1.1.1.tgz","integrity":"sha512-46zoN4Y65nJ0tyXQyT6DsacRgnfjMEIiY/yc0Ges7bDKrW3F9dcw7PHqnc55Z4dTeQXecVxtFxp5h2QB843zBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4WIVylOGFhEpP+iQfLXJnCY5IT3I8H3TEfZORZV7VQgIhAJMJ8Xhcq8OWmnRoxWtmObU9ajsj9rQPlaDAtTTpj8rt"}]}},"1.1.2":{"name":"reflip","version":"1.1.2","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"mocha -R spec test/*.js"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~2.9.14","lodash":"~3.5.0","redis":"~0.12.1","hiredis":"~0.2.0"},"optionalDependencies":{"hiredis":"~0.2.0"},"devDependencies":{"mocha":"~2.1.0","must":"~0.12.0","sinon":"latest"},"gitHead":"a60777de7e19d9a880dcfd956d1f950d7d3608c2","homepage":"https://github.com/ceejbot/reflip","_id":"reflip@1.1.2","_shasum":"43dabe41a92074114a85903eb2d8e8b410e8695d","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}],"dist":{"shasum":"43dabe41a92074114a85903eb2d8e8b410e8695d","tarball":"https://registry.npmjs.org/reflip/-/reflip-1.1.2.tgz","integrity":"sha512-bAFn2qlf0DS7KiW76VrtmnlSzL5OlTcTyWvtpst4e8qYuB/cBaRpr3qP88+0JoEZAZz6HBRku4hyeklb2lgFNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYai9VOCej4SNQnFXAGBKlpKXJwx62SmkrNBUc5BRGsAiEA+I3HaIVhxF0HWHRQnejjNdWf/9F08MMLyg6tWNWt3GE="}]}},"1.1.3":{"name":"reflip","version":"1.1.3","description":"key-value-store-backed feature flipping middleware for connect/express.js","author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"license":"MIT","main":"index.js","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"directories":{"test":"test","lib":"lib"},"scripts":{"test":"mocha -R spec test/*.js"},"config":{"blanket":{"pattern":"//^((?!/node_modules|test/).)*$/ig"}},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"dependencies":{"bluebird":"~2.9.14","lodash":"~3.5.0","redis":"~0.12.1","hiredis":"~0.2.0"},"optionalDependencies":{"hiredis":"~0.2.0"},"devDependencies":{"mocha":"~2.1.0","must":"~0.12.0","sinon":"latest"},"gitHead":"09ba73ffd94b0246b2805c7396a8dec454ab8116","homepage":"https://github.com/ceejbot/reflip","_id":"reflip@1.1.3","_shasum":"b7bc9f6df3ca53f550ff2d5e64a2df050a8bd42d","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"ceejbot","email":"ceejceej@gmail.com"},"maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}],"dist":{"shasum":"b7bc9f6df3ca53f550ff2d5e64a2df050a8bd42d","tarball":"https://registry.npmjs.org/reflip/-/reflip-1.1.3.tgz","integrity":"sha512-aP/IdQD+Zn/1wE2rGMmx6vf14BnbKnPDlL9mMlZXxgd75ZfCbAA2yRoWnKp2mU1KRUU6Ozt34uJTHYpdfZW5dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgMsPIOaL+MvJ/4qIGUno/fmQvq/wOKzeVmFmA+ircdgIhAIVFcHnnZXYDv7y4qoNOFWSRTcYZprz/g8b4GWG0DX0H"}]}}},"readme":"# reflip\n\nRedis-backed or file-backed feature flipping middleware for connect/express.js. It should be straightforward to write additional storage adapters.\n\n\n[![Tests](http://img.shields.io/travis/ceejbot/reflip.svg?style=flat)](http://travis-ci.org/ceejbot/reflip) ![Coverage](http://img.shields.io/badge/coverage-93%25-green.svg?style=flat)  [![Dependencies](http://img.shields.io/david/ceejbot/reflip.svg?style=flat)](https://david-dm.org/ceejbot/reflip) ![io.js supported](https://img.shields.io/badge/io.js-supported-green.svg?style=flat)\n\n## Example\n\n```javascript\nvar Reflip = require('reflip'),\n    express = require('express');\n\nvar reflip = new Reflip(\n{\n    storage: new Reflip.RedisAdapter(\n    {\n        client: redis.createClient(),\n        namespace: 'myapp:',\n        ttl: 60 * 1000\n    }),\n});\n\nreflip.register('aardvarks', 'custom', function(request)\n{\n    return reflip.check('aardvark-enabled') && !!request.user;\n});\n\nvar app = express();\napp.use(express.session()); // etc\napp.use(reflip.flip());\n\napp.get('/aardvarks', serveArdvarks);\napp.get('/anteaters', reflip.gate('anteaters'), serveAnteaters);\n\nfunction serveArdvarks(request, response)\n{\n    // has access to the session info; can make exciting decisions\n    if (!request.check('aardvarks') || request.session.alpacasPreferred)\n    {\n        response.redirect('/alpacas');\n        return;\n    }\n\n    response.render('aardvarks');\n}\n\nfunction serveAnteaters(request, response)\n{\n    // if we reach here at all, the anteater feature is enabled\n    response.render('anteaters');\n}\n```\n\n## API\n\n### new Reflip(options)\n\nThe options object may include the following fields:\n\n- `storage`: a storage adapter; can be nil if you are operating from a predefined object only\n- `default`: default response for unknown features; defaults to `false`\n- `httpcode`: the status code to use when blocking requests for disabled features; defaults to 404\n- `features`: an object pre-defining feature defaults; is overridden after `ttl` milliseconds by the values in remote storage if that is enabled\n- `exportName`: the name of the function to hang onto each request object; use if `check()` would conflict with other Connect middleware\n\n\n### reflip.register('feature-name', function(request) {})\n\nRegister a custom feature name with a function that decides based on the request object if it is enabled or not. Can return a promise. (This is a lie; I need to make this work.)\n\n### reflip.register(new Reflip.Feature(opts))\n\nRegister a pre-constructed feature that makes its decisions in any manner you define.\n\n### reflip.flip()\n\nThe middleware that decorates each request object with the result of feature checks.\n\n```javascript\napp.use(reflip.flip());\n```\n\nThe middleware pre-calculates the answers for all feature checks & adds a `check()` function to each request object.\n\n### request.check('feature-name')\n\nDetermines if the named feature is turned on or not. Returns a falsey value if this feature is off for this request. Returns a truthy value if it should be enabled. If the feature is of type `grouped`, it will return a string indicating which group this request is in.\n\n### request.check()\n\nReturns the internal cache of all feature names and their corresponding states for this request. Note that mutating the cache will affect the results returned by `request.check('feature-name')`.\n\n### reflip.gate('feature-name', [failureHandler])\n\nUse as middleware for specific routes; responds to the request with `reflip.httpcode` if the feature is not enabled for that request.\n\n```javascript\napp.get('/anteaters', reflip.gate('anteaters'), serveAnteaters);\n```\n\nAlternatively, you can provide a `failureHandler` function that returns a custom response. The `reflip.httpcode` property will be ignored if a failure handler is specified.\n\n```javascript\napp.get('/anteaters', reflip.gate('anteaters', function(request, response)\n{\n    response.json(403,\n    {\n        code: 'ForbiddenError',\n        message: 'This feature is unavailable.'\n    });\n}), serveAnteaters);\n```\n\n### reflip.refresh()\n\nForces the adapter layer to refresh; normally called by the interval timer. Returns a promise that resolves when the lookup is complete. Updates the list of features completely, adding new ones and removing older ones. Also updates the timeout.\n\n## Feature\n\nThe feature object represents a feature that can be flipped on or off.\n\n```javascript\nvar feature = new Reflip.Feature(\n{\n    name: 'anteaters',\n    type: 'metered',\n    chance: 50,\n});\n```\n\nValid types:\n\n* `boolean`: on or off.\n* `metered`: the feature has a percent chance of being turned on\n* `grouped`: a list of possible values for the feature, each of which has an equal chance of appearing; useful for rudimentary a/b testing\n* `custom`: you provide the function used to decide if the feature is enabled. The checker function is given the express request object to use to make its decision.\n\nValid feature fields:\n\n* `name`: required, string name of feature\n* `type`: required; string type of feature\n* `enabled`: boolean, used for boolean features\n* `groups`: array, used for grouped features\n* `chance`: number from 0-100, used for metered features\n* `checker`: called by check() in lieu of other decision-making; used for custom features\n\n## File adapter\n\nUsage: `storage = new Reflip.FileAdapter({ filename: './features.json'});`\n\nExample file:\n\n```javascript\n{\n    \"features\":\n    [\n        {\n            \"name\": \"aardvarks\",\n            \"type\": \"boolean\",\n            \"enabled\": true\n        },\n        {\n            \"name\": \"archaeopteryx\",\n            \"type\": \"boolean\",\n            \"enabled\": false\n        },\n        {\n            \"name\": \"anteaters\",\n            \"type\": \"metered\",\n            \"enabled\": true,\n            \"chance\": 25\n        },\n        {\n            \"name\": \"alpacas\",\n            \"type\": \"grouped\",\n            \"enabled\": true,\n            \"groups\": [ \"a\", \"b\", \"c\" ]\n        }\n    ]\n}\n```\n\nThe `ttl` field, if present in the features hash, is ignored. The file adapter uses `fs.watch()` to observe changes in the file. The [usual fs.watch() caveats](http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener) apply.\n\n## Redis adapter\n\n```javascript\nvar storage = new Reflip.RedisAdapter(\n{\n    client: redis.createClient(), // or supply `host` and `port` fields\n    namespace: 'key-prefix:',     // optional\n    ttl: 60000                    // optional; refresh interval in milliseconds; defaults to 5 minutes\n});\n```\n\nThe redis adapter expects to find the following keys:\n\n* `key-prefix:ttl`: integer giving time until next refresh, in milliseconds\n* `key-prefix:features`: set giving string feature names\n* `key-prefix:<name>`: hash, one per feature. The hash is passed directly to the Feature constructor as documented above.\n\n## TODO\n\nThe module should work well as a express middleware right now. However, it would be nice to have conveniences for adding/editing/removing feature switches from redis, out of band of the Reflip instance (since it is intended to update itself periodically). Maybe a tiny web app that does nothing but update redis?\n\n## LICENSE\n\nMIT.\n","maintainers":[{"name":"ceejbot","email":"ceejceej@gmail.com"}],"time":{"modified":"2022-06-26T10:38:50.553Z","created":"2013-10-18T04:28:56.654Z","0.0.1":"2013-10-18T04:28:58.147Z","0.0.2":"2013-11-23T19:15:03.706Z","0.1.0":"2013-11-27T02:54:33.167Z","0.1.1":"2013-11-27T23:57:11.281Z","0.1.2":"2013-11-28T03:16:15.092Z","0.2.2":"2013-12-17T01:16:13.793Z","0.2.3":"2013-12-20T01:25:35.142Z","0.2.4":"2014-02-01T01:59:18.066Z","1.0.0":"2014-02-21T22:35:27.840Z","1.1.0":"2014-07-26T17:40:15.946Z","1.1.1":"2014-07-28T20:43:01.683Z","1.1.2":"2015-03-21T00:08:53.899Z","1.1.3":"2015-03-21T00:23:40.741Z"},"author":{"name":"C J Silverio","email":"ceejceej@gmail.com"},"repository":{"type":"git","url":"git://github.com/ceejbot/reflip.git"},"readmeFilename":"README.md","homepage":"https://github.com/ceejbot/reflip","keywords":["connect","express.js","middleware","feature","feature-flip","a/b","testing","redis"],"contributors":[{"name":"C J Silverio","email":"ceejceej@gmail.com"},{"name":"Kit Cambridge","email":"kit@cambridge.be"}],"bugs":{"url":"https://github.com/ceejbot/reflip/issues"},"license":"MIT"}