UNPKG

translate-maker

Version:

Lightweight translation module. Internationalize your great project.

61 lines (44 loc) 1.19 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = void 0; var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")); var _Cache2 = _interopRequireDefault(require("./Cache")); var Memory = /*#__PURE__*/ function (_Cache) { (0, _inheritsLoose2.default)(Memory, _Cache); function Memory(options) { var _this; if (options === void 0) { options = {}; } _this = _Cache.call(this, options) || this; _this.data = {}; return _this; } var _proto = Memory.prototype; _proto.get = function get(key) { return this.data[key]; }; _proto.has = function has(key) { return !!this.data[key]; }; _proto.set = function set(key, value) { this.data[key] = value; return true; }; _proto.clear = function clear() { this.data = {}; return true; }; _proto.dehydrate = function dehydrate() { return this.data; }; _proto.rehydrate = function rehydrate(state) { this.data = state; }; return Memory; }(_Cache2.default); exports.default = Memory; //# sourceMappingURL=Memory.js.map