hbp-quickfire
Version:
A library of useful user-interface components built with React on top of React Bootstrap and MobX
20 lines (16 loc) • 4.86 kB
JavaScript
var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}} /*
* Copyright (c) Human Brain Project
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var
OptionsStore = function () {function OptionsStore() {_classCallCheck(this, OptionsStore);this.
optionsCache = new Map();this.
pendingPromises = new Map();}_createClass(OptionsStore, [{ key: "getOptions", value: function getOptions(
url) {
return this.optionsCache.get(url);
} }, { key: "setOptions", value: function setOptions(
url, data) {
return this.optionsCache.set(url, data);
} }]);return OptionsStore;}();
export default new OptionsStore();