1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _Storage = require('./Storage');
|
8 |
|
9 | var _Storage2 = _interopRequireDefault(_Storage);
|
10 |
|
11 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | class MapStorage extends _Storage2.default {
|
18 | static get $dependencies() {
|
19 | return [];
|
20 | }
|
21 |
|
22 | |
23 |
|
24 |
|
25 | constructor() {
|
26 | super();
|
27 |
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | this._storage = new Map();
|
35 | }
|
36 |
|
37 | |
38 |
|
39 |
|
40 | init() {
|
41 | return this;
|
42 | }
|
43 |
|
44 | |
45 |
|
46 |
|
47 | has(key) {
|
48 | return this._storage.has(key);
|
49 | }
|
50 |
|
51 | |
52 |
|
53 |
|
54 | get(key) {
|
55 | return this._storage.get(key);
|
56 | }
|
57 |
|
58 | |
59 |
|
60 |
|
61 | set(key, value) {
|
62 | this._storage.set(key, value);
|
63 | return this;
|
64 | }
|
65 |
|
66 | |
67 |
|
68 |
|
69 | delete(key) {
|
70 | this._storage.delete(key);
|
71 | return this;
|
72 | }
|
73 |
|
74 | |
75 |
|
76 |
|
77 | clear() {
|
78 | this._storage.clear();
|
79 | return this;
|
80 | }
|
81 |
|
82 | |
83 |
|
84 |
|
85 | keys() {
|
86 | return this._storage.keys();
|
87 | }
|
88 |
|
89 | |
90 |
|
91 |
|
92 | size() {
|
93 | return this._storage.size;
|
94 | }
|
95 | }
|
96 | exports.default = MapStorage;
|
97 |
|
98 | typeof $IMA !== 'undefined' && $IMA !== null && $IMA.Loader && $IMA.Loader.register('ima/storage/MapStorage', [], function (_export, _context) {
|
99 | 'use strict';
|
100 | return {
|
101 | setters: [],
|
102 | execute: function () {
|
103 | _export('default', exports.default);
|
104 | }
|
105 | };
|
106 | });
|