mol_wire_lib 1.0.431 → 1.0.433

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mol_wire_lib",
3
- "version": "1.0.431",
3
+ "version": "1.0.433",
4
4
  "main": "node.js",
5
5
  "module": "node.esm.js",
6
6
  "browser": "web.js",
package/web.test.js CHANGED
@@ -1697,24 +1697,30 @@ var $;
1697
1697
  (function ($) {
1698
1698
  $mol_test({
1699
1699
  'define as methods'() {
1700
- const { foo, bar } = $mol_wire_let({
1700
+ const { foo, bar, lol } = $mol_wire_let({
1701
1701
  foo(next = 1) { return next; },
1702
1702
  bar() { return this.foo() + 1; },
1703
+ lol(next) { return this.foo(next); },
1703
1704
  });
1704
1705
  $mol_assert_equal(foo(), 1);
1705
1706
  $mol_assert_equal(bar(), 2);
1706
1707
  $mol_assert_equal(foo(5), 5);
1707
1708
  $mol_assert_equal(bar(), 6);
1709
+ $mol_assert_equal(lol(10), 10);
1710
+ $mol_assert_equal(bar(), 11);
1708
1711
  },
1709
1712
  'define as closures'() {
1710
- const { foo, bar } = $mol_wire_let({
1713
+ const { foo, bar, lol } = $mol_wire_let({
1711
1714
  foo: (next = 1) => next,
1712
1715
  bar: () => foo() + 1,
1716
+ lol: (next) => foo(next),
1713
1717
  });
1714
1718
  $mol_assert_equal(foo(), 1);
1715
1719
  $mol_assert_equal(bar(), 2);
1716
1720
  $mol_assert_equal(foo(5), 5);
1717
1721
  $mol_assert_equal(bar(), 6);
1722
+ $mol_assert_equal(lol(10), 10);
1723
+ $mol_assert_equal(bar(), 11);
1718
1724
  },
1719
1725
  });
1720
1726
  })($ || ($ = {}));