mol_db 0.0.374 → 0.0.375

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
@@ -1417,8 +1417,9 @@ var $;
1417
1417
  'Map'() {
1418
1418
  $mol_assert_ok($mol_compare_deep(new Map, new Map));
1419
1419
  $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1420
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1420
1421
  $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1421
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1422
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1422
1423
  },
1423
1424
  'Set'() {
1424
1425
  $mol_assert_ok($mol_compare_deep(new Set, new Set));
@@ -1533,7 +1534,7 @@ var $;
1533
1534
  }
1534
1535
  return true;
1535
1536
  }
1536
- function compare_iterator(left, right, compare) {
1537
+ function compare_iterator(left, right) {
1537
1538
  while (true) {
1538
1539
  const left_next = left.next();
1539
1540
  const right_next = right.next();
@@ -1541,7 +1542,7 @@ var $;
1541
1542
  return false;
1542
1543
  if (left_next.done)
1543
1544
  break;
1544
- if (!compare(left_next.value, right_next.value))
1545
+ if (!$mol_compare_deep(left_next.value, right_next.value))
1545
1546
  return false;
1546
1547
  }
1547
1548
  return true;
@@ -1549,13 +1550,13 @@ var $;
1549
1550
  function compare_set(left, right) {
1550
1551
  if (left.size !== right.size)
1551
1552
  return false;
1552
- return compare_iterator(left.values(), right.values(), $mol_compare_deep);
1553
+ return compare_iterator(left.values(), right.values());
1553
1554
  }
1554
1555
  function compare_map(left, right) {
1555
1556
  if (left.size !== right.size)
1556
1557
  return false;
1557
- return compare_iterator(left.keys(), right.keys(), Object.is)
1558
- && compare_iterator(left.values(), right.values(), $mol_compare_deep);
1558
+ return compare_iterator(left.keys(), right.keys())
1559
+ && compare_iterator(left.values(), right.values());
1559
1560
  }
1560
1561
  function compare_pojo(left, right) {
1561
1562
  const left_keys = Object.getOwnPropertyNames(left);