@startinblox/core 0.19.17 → 0.19.18
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.
- package/dist/index.js +13 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12857,17 +12857,22 @@ const SorterMixin = {
|
|
|
12857
12857
|
},
|
|
12858
12858
|
sortValuesByKey(key, asc) {
|
|
12859
12859
|
return function(a, b) {
|
|
12860
|
-
if (!a
|
|
12860
|
+
if (!a.hasOwnProperty(key))
|
|
12861
12861
|
return 1;
|
|
12862
|
-
if (!b
|
|
12862
|
+
if (!b.hasOwnProperty(key))
|
|
12863
12863
|
return -1;
|
|
12864
|
-
const varA =
|
|
12865
|
-
const varB =
|
|
12864
|
+
const varA = a[key];
|
|
12865
|
+
const varB = b[key];
|
|
12866
12866
|
let comparison = 0;
|
|
12867
|
-
if (varA
|
|
12868
|
-
comparison =
|
|
12869
|
-
|
|
12870
|
-
|
|
12867
|
+
if (typeof varA === "string" && typeof varB === "string") {
|
|
12868
|
+
comparison = varA.localeCompare(varB, void 0, { sensitivity: "base" });
|
|
12869
|
+
comparison = asc ? comparison : -comparison;
|
|
12870
|
+
} else {
|
|
12871
|
+
if (varA > varB)
|
|
12872
|
+
comparison = asc ? 1 : -1;
|
|
12873
|
+
else if (varA < varB)
|
|
12874
|
+
comparison = asc ? -1 : 1;
|
|
12875
|
+
}
|
|
12871
12876
|
return comparison;
|
|
12872
12877
|
};
|
|
12873
12878
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.18",
|
|
4
4
|
"description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|