UNPKG

redux-ab-test

Version:

A/B testing React components with Redux and debug tools. Isomorphic with a simple, universal interface. Well documented and lightweight. Tested in popular browsers and Node.js. Includes helpers for React, Redux, and Segment.io

55 lines (45 loc) 905 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = createCacheStore; // // Helpers: // function createCacheStore() { var _cache = {}; var noopStore = { cache: function () { function cache() { return _cache; } return cache; }(), getItem: function () { function getItem(key) { return _cache[key]; } return getItem; }(), setItem: function () { function setItem(key, value) { _cache[key] = value; } return setItem; }(), removeItem: function () { function removeItem(key) { delete _cache[key]; } return removeItem; }(), clear: function () { function clear() { _cache = {}; } return clear; }() }; return noopStore; } var cacheStore = exports.cacheStore = createCacheStore();