mol_regexp 0.0.475 → 0.0.476

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.test.js CHANGED
@@ -981,8 +981,9 @@ var $;
981
981
  'Map'() {
982
982
  $mol_assert_ok($mol_compare_deep(new Map, new Map));
983
983
  $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
984
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
984
985
  $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
985
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
986
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
986
987
  },
987
988
  'Set'() {
988
989
  $mol_assert_ok($mol_compare_deep(new Set, new Set));
@@ -1097,7 +1098,7 @@ var $;
1097
1098
  }
1098
1099
  return true;
1099
1100
  }
1100
- function compare_iterator(left, right, compare) {
1101
+ function compare_iterator(left, right) {
1101
1102
  while (true) {
1102
1103
  const left_next = left.next();
1103
1104
  const right_next = right.next();
@@ -1105,7 +1106,7 @@ var $;
1105
1106
  return false;
1106
1107
  if (left_next.done)
1107
1108
  break;
1108
- if (!compare(left_next.value, right_next.value))
1109
+ if (!$mol_compare_deep(left_next.value, right_next.value))
1109
1110
  return false;
1110
1111
  }
1111
1112
  return true;
@@ -1113,13 +1114,13 @@ var $;
1113
1114
  function compare_set(left, right) {
1114
1115
  if (left.size !== right.size)
1115
1116
  return false;
1116
- return compare_iterator(left.values(), right.values(), $mol_compare_deep);
1117
+ return compare_iterator(left.values(), right.values());
1117
1118
  }
1118
1119
  function compare_map(left, right) {
1119
1120
  if (left.size !== right.size)
1120
1121
  return false;
1121
- return compare_iterator(left.keys(), right.keys(), Object.is)
1122
- && compare_iterator(left.values(), right.values(), $mol_compare_deep);
1122
+ return compare_iterator(left.keys(), right.keys())
1123
+ && compare_iterator(left.values(), right.values());
1123
1124
  }
1124
1125
  function compare_pojo(left, right) {
1125
1126
  const left_keys = Object.getOwnPropertyNames(left);