UNPKG

760 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
9var _class = function () {
10 function _class() {
11 _classCallCheck(this, _class);
12
13 this.size = 0;
14 this.keys = [];
15 this.values = [];
16 }
17
18 _class.prototype.get = function get(key) {
19 var index = this.keys.indexOf(key);
20
21 return this.values[index];
22 };
23
24 _class.prototype.set = function set(key, value) {
25 this.keys.push(key);
26 this.values.push(value);
27 this.size = this.keys.length;
28
29 return value;
30 };
31
32 return _class;
33}();
34
35exports.default = _class;
36module.exports = exports["default"];
\No newline at end of file