mol_wire_lib 1.0.805 → 1.0.807

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.mjs CHANGED
@@ -1041,11 +1041,15 @@ var $;
1041
1041
  (function ($) {
1042
1042
  $.$mol_key_store = new WeakMap();
1043
1043
  function $mol_key(value) {
1044
+ if (typeof value === 'bigint')
1045
+ return value.toString() + 'n';
1044
1046
  if (!value)
1045
1047
  return JSON.stringify(value);
1046
1048
  if (typeof value !== 'object' && typeof value !== 'function')
1047
1049
  return JSON.stringify(value);
1048
1050
  return JSON.stringify(value, (field, value) => {
1051
+ if (typeof value === 'bigint')
1052
+ return value.toString() + 'n';
1049
1053
  if (!value)
1050
1054
  return value;
1051
1055
  if (typeof value !== 'object' && typeof value !== 'function')
package/node.test.js CHANGED
@@ -1033,11 +1033,15 @@ var $;
1033
1033
  (function ($) {
1034
1034
  $.$mol_key_store = new WeakMap();
1035
1035
  function $mol_key(value) {
1036
+ if (typeof value === 'bigint')
1037
+ return value.toString() + 'n';
1036
1038
  if (!value)
1037
1039
  return JSON.stringify(value);
1038
1040
  if (typeof value !== 'object' && typeof value !== 'function')
1039
1041
  return JSON.stringify(value);
1040
1042
  return JSON.stringify(value, (field, value) => {
1043
+ if (typeof value === 'bigint')
1044
+ return value.toString() + 'n';
1041
1045
  if (!value)
1042
1046
  return value;
1043
1047
  if (typeof value !== 'object' && typeof value !== 'function')
@@ -3885,6 +3889,7 @@ var $;
3885
3889
  $mol_assert_equal($mol_key(false), 'false');
3886
3890
  $mol_assert_equal($mol_key(true), 'true');
3887
3891
  $mol_assert_equal($mol_key(0), '0');
3892
+ $mol_assert_equal($mol_key(1n << 64n), '18446744073709551616n');
3888
3893
  $mol_assert_equal($mol_key(''), '""');
3889
3894
  },
3890
3895
  'Array & POJO'() {