@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.
Files changed (2) hide show
  1. package/dist/index.js +13 -8
  2. 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[key])
12860
+ if (!a.hasOwnProperty(key))
12861
12861
  return 1;
12862
- if (!b[key])
12862
+ if (!b.hasOwnProperty(key))
12863
12863
  return -1;
12864
- const varA = typeof a[key] === "string" ? a[key].toUpperCase() : a[key];
12865
- const varB = typeof b[key] === "string" ? b[key].toUpperCase() : b[key];
12864
+ const varA = a[key];
12865
+ const varB = b[key];
12866
12866
  let comparison = 0;
12867
- if (varA > varB)
12868
- comparison = asc ? 1 : -1;
12869
- else if (varA < varB)
12870
- comparison = asc ? -1 : 1;
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.17",
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",