hyoo_sync_client 0.0.260 → 0.0.262
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/node.deps.json +1 -1
- package/node.js +3 -1
- package/node.js.map +1 -1
- package/node.mjs +3 -1
- package/node.test.js +8 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +3 -1
- package/web.js.map +1 -1
- package/web.mjs +3 -1
- package/web.test.js +5 -0
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -1281,7 +1281,7 @@ var $;
|
|
|
1281
1281
|
var $;
|
|
1282
1282
|
(function ($) {
|
|
1283
1283
|
function $mol_promise_like(val) {
|
|
1284
|
-
return val && typeof val.then === 'function';
|
|
1284
|
+
return val && typeof val === 'object' && 'then' in val && typeof val.then === 'function';
|
|
1285
1285
|
}
|
|
1286
1286
|
$.$mol_promise_like = $mol_promise_like;
|
|
1287
1287
|
})($ || ($ = {}));
|
|
@@ -1549,6 +1549,8 @@ var $;
|
|
|
1549
1549
|
return value;
|
|
1550
1550
|
if (value instanceof RegExp)
|
|
1551
1551
|
return value.toString();
|
|
1552
|
+
if (value instanceof Uint8Array)
|
|
1553
|
+
return [...value];
|
|
1552
1554
|
let key = $.$mol_key_store.get(value);
|
|
1553
1555
|
if (key)
|
|
1554
1556
|
return key;
|
package/web.test.js
CHANGED
|
@@ -3831,6 +3831,11 @@ var $;
|
|
|
3831
3831
|
$mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
|
|
3832
3832
|
$mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
|
|
3833
3833
|
},
|
|
3834
|
+
'Uint8Array'() {
|
|
3835
|
+
$mol_assert_equal($mol_key(new Uint8Array([1, 2])), '[1,2]');
|
|
3836
|
+
$mol_assert_equal($mol_key([new Uint8Array([1, 2])]), '[[1,2]]');
|
|
3837
|
+
$mol_assert_equal($mol_key({ foo: new Uint8Array([1, 2]) }), '{"foo":[1,2]}');
|
|
3838
|
+
},
|
|
3834
3839
|
'Function'() {
|
|
3835
3840
|
const func = () => { };
|
|
3836
3841
|
$mol_assert_equal($mol_key(func), $mol_key(func));
|