UNPKG

@ima/core

Version:

IMA.js framework for isomorphic javascript application

64 lines (63 loc) 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "MapStorage", { enumerable: true, get: function() { return MapStorage; } }); const _Storage = require("./Storage"); class MapStorage extends _Storage.Storage { /** * The internal storage of entries. */ _storage = new Map(); static get $dependencies() { return []; } /** * @inheritDoc */ init() { return this; } /** * @inheritDoc */ has(key) { return this._storage.has(key); } /** * @inheritDoc */ get(key) { return this._storage.get(key); } /** * @inheritDoc */ set(key, value) { this._storage.set(key, value); return this; } /** * @inheritDoc */ delete(key) { this._storage.delete(key); return this; } /** * @inheritDoc */ clear() { this._storage.clear(); return this; } /** * @inheritDoc */ keys() { return this._storage.keys(); } /** * @override */ size() { return this._storage.size; } } //# sourceMappingURL=MapStorage.js.map