1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | exports.AbstractTableDictCore = void 0;
|
7 | class AbstractTableDictCore {
|
8 | constructor(type, options = {}, existsTable, ...argv) {
|
9 | this.TABLE = {};
|
10 | this.TABLE2 = {};
|
11 | this.type = type;
|
12 | this.options = Object.assign({}, this.options, options);
|
13 | if (existsTable) {
|
14 | if (existsTable.TABLE) {
|
15 | this.TABLE = existsTable.TABLE;
|
16 | }
|
17 | if (existsTable.TABLE2) {
|
18 | this.TABLE2 = existsTable.TABLE2;
|
19 | }
|
20 | }
|
21 | }
|
22 | _exists(data, ...argv) {
|
23 | let w, p, f;
|
24 | if (typeof data == 'string') {
|
25 | w = data;
|
26 | }
|
27 | else if (Array.isArray(data)) {
|
28 | [w, p, f] = data;
|
29 | }
|
30 | else {
|
31 | ({ w, p, f } = data);
|
32 | }
|
33 | return w;
|
34 | }
|
35 | exists(data, ...argv) {
|
36 | let w = this._exists(data);
|
37 | return this.TABLE[w] || null;
|
38 | }
|
39 | size() {
|
40 | return Object.keys(this.TABLE).length;
|
41 | }
|
42 | }
|
43 | exports.AbstractTableDictCore = AbstractTableDictCore;
|
44 | exports.default = AbstractTableDictCore;
|
45 |
|
\ | No newline at end of file |