mol_plot_all 1.2.837 → 1.2.838

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/web.mjs CHANGED
@@ -643,7 +643,7 @@ var $;
643
643
  var $;
644
644
  (function ($) {
645
645
  function $mol_promise_like(val) {
646
- return val && typeof val.then === 'function';
646
+ return val && typeof val === 'object' && 'then' in val && typeof val.then === 'function';
647
647
  }
648
648
  $.$mol_promise_like = $mol_promise_like;
649
649
  })($ || ($ = {}));
@@ -911,6 +911,8 @@ var $;
911
911
  return value;
912
912
  if (value instanceof RegExp)
913
913
  return value.toString();
914
+ if (value instanceof Uint8Array)
915
+ return [...value];
914
916
  let key = $.$mol_key_store.get(value);
915
917
  if (key)
916
918
  return key;
package/web.test.js CHANGED
@@ -2163,6 +2163,11 @@ var $;
2163
2163
  $mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
2164
2164
  $mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
2165
2165
  },
2166
+ 'Uint8Array'() {
2167
+ $mol_assert_equal($mol_key(new Uint8Array([1, 2])), '[1,2]');
2168
+ $mol_assert_equal($mol_key([new Uint8Array([1, 2])]), '[[1,2]]');
2169
+ $mol_assert_equal($mol_key({ foo: new Uint8Array([1, 2]) }), '{"foo":[1,2]}');
2170
+ },
2166
2171
  'Function'() {
2167
2172
  const func = () => { };
2168
2173
  $mol_assert_equal($mol_key(func), $mol_key(func));