@dra2020/baseclient 1.0.148 → 1.0.150
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/baseclient.js +8 -1
- package/dist/baseclient.js.map +1 -1
- package/dist/util/util.d.ts +1 -0
- package/lib/geo/geo.ts +1 -0
- package/lib/util/util.ts +7 -0
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -2639,6 +2639,8 @@ function isValidId(col) {
|
|
|
2639
2639
|
let set = new Set();
|
|
2640
2640
|
for (let i = 0; i < col.features.length; i++) {
|
|
2641
2641
|
let f = col.features[i];
|
|
2642
|
+
if (typeof f.properties.id === 'number')
|
|
2643
|
+
f.properties.id = String(f.properties.id); // Fix old 2016_BG collections
|
|
2642
2644
|
if (typeof f.properties.id !== 'string')
|
|
2643
2645
|
return false; // id must be string
|
|
2644
2646
|
if (set.has(f.properties.id))
|
|
@@ -11797,7 +11799,7 @@ exports.IndexedArray = IndexedArray;
|
|
|
11797
11799
|
|
|
11798
11800
|
|
|
11799
11801
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11800
|
-
exports.toSafeNumber = exports.toNumber = exports.isNumber = exports.wrapLon = exports.rad2deg = exports.deg2rad = exports.distance = exports.toRGBAIntensity = exports.toRGBA = exports.toHex = exports.hashObject = exports.hash = exports.percentString = exports.precisionRound = exports.deepAccum = exports.deepCopy = exports.shallowEqual = exports.shallowAssignImmutable = exports.shallowDelete = exports.shallowAssign = exports.shallowCopy = exports.textToHtml = exports.recentDate = exports.relativeDate = exports.prettyDate = exports.deepEqual = exports.partialEqual = exports.nthKey = exports.nthProperty = exports.countKeys = exports.isEmpty = exports.depthof = exports.sizeof = exports.guidKey = exports.createKeyedGuid = exports.createGuid = exports.Deadline = exports.MultiTimer = exports.Elapsed = exports.Now = void 0;
|
|
11802
|
+
exports.toSafeNumber = exports.toNumber = exports.isNumber = exports.wrapLon = exports.rad2deg = exports.deg2rad = exports.distance = exports.toRGBAIntensity = exports.toRGBA = exports.toHex = exports.hashObject = exports.hash = exports.percentString = exports.precisionRound = exports.deepAccum = exports.deepCopy = exports.shallowEqual = exports.shallowAssignImmutable = exports.shallowDelete = exports.shallowAssign = exports.shallowCopy = exports.textToHtml = exports.recentDate = exports.relativeDate = exports.prettyDate = exports.deepEqual = exports.partialEqual = exports.nthKey = exports.nthProperty = exports.countKeys = exports.isEmpty = exports.depthof = exports.sizeof = exports.guidKey = exports.createKeyedGuid = exports.isGuid = exports.createGuid = exports.Deadline = exports.MultiTimer = exports.Elapsed = exports.Now = void 0;
|
|
11801
11803
|
function Now() { return (new Date()).toJSON(); }
|
|
11802
11804
|
exports.Now = Now;
|
|
11803
11805
|
// polyfill
|
|
@@ -11896,6 +11898,11 @@ function createGuid() {
|
|
|
11896
11898
|
});
|
|
11897
11899
|
}
|
|
11898
11900
|
exports.createGuid = createGuid;
|
|
11901
|
+
const reGuid = /.*-.*-.*-.*-/;
|
|
11902
|
+
function isGuid(s) {
|
|
11903
|
+
return reGuid.test(s) && s.length >= 36;
|
|
11904
|
+
}
|
|
11905
|
+
exports.isGuid = isGuid;
|
|
11899
11906
|
function createKeyedGuid(key) {
|
|
11900
11907
|
return `xxxxxxxx-xxxx-${key}xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g, function (c) {
|
|
11901
11908
|
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
|