realar-project / realar

5 kB Advanced state manager for React
MIT License
44 stars 0 forks source link

low: flow.filter shortcut #79

Closed betula closed 3 years ago

betula commented 3 years ago
    signal
      .from(() => sharedCardPage().hasCard)
      .flow.filter((flag) => flag)
      .watch(this.inc)

// -->

  .flow.filter() // same as  .flow.filter((flag) => flag)
  .flow.filter.not() //  same as .flow.filter((flag) => !flag)
betula commented 3 years ago

Implemented for "filter" and "filter.not" 0.6.0