exupery-core-internals 0.1.15 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,7 @@ class Dictionary {
|
|
|
27
27
|
};
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
deprecated_to_array(compare) {
|
|
31
31
|
const sorted_keys = this.source.slice().sort(compare);
|
|
32
32
|
return (0, array_literal_1.array_literal)(sorted_keys);
|
|
33
33
|
}
|
|
@@ -40,29 +40,8 @@ class Dictionary {
|
|
|
40
40
|
}
|
|
41
41
|
return (0, not_set_1.not_set)();
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const element = this.source[i];
|
|
46
|
-
if (element.key === key) {
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return new Dictionary([...this.source, { key: key, value: value }]);
|
|
51
|
-
}
|
|
52
|
-
__add_entry_overwrite_if_exists(key, value) {
|
|
53
|
-
return new Dictionary(this.source.map((entry) => {
|
|
54
|
-
if (entry.key === key) {
|
|
55
|
-
return { key: key, value: value };
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return entry;
|
|
59
|
-
}
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
__remove_entry_if_exists(key) {
|
|
63
|
-
return new Dictionary(this.source.filter((entry) => {
|
|
64
|
-
return entry.key !== key;
|
|
65
|
-
}));
|
|
43
|
+
__get_number_of_entries() {
|
|
44
|
+
return this.source.length;
|
|
66
45
|
}
|
|
67
46
|
}
|
|
68
47
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exupery-core-internals",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "Corno",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "https://github.com/corno/exupery-core/issues"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"exupery-core-types": "^0.
|
|
18
|
+
"exupery-core-types": "^0.3.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"types": "dist/index.d.ts",
|