-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
low: flow method #41
Labels
enhancement
New feature or request
Comments
Closed
const v = value(0);
const positive_v = v.flow((positive, n) => n >= 0 && positive(n));
on(positive_v, console.log) // only positive reactions and values Question: How to make a signal from value? const s = signal.from(value); // That syntax is perfect! |
Add possibility for use const src = value(0);
const dst = value(0);
src.flow(dst); |
|
Extend syntax for class SwipeAnim {
get process() { return swipeAnimProcess.val; }
set process(v: boolean) { swipeAnimProcess(v); }
constructor() {
swipeBreak.flow.filter(() => this.process);
// or new syntax
swipeBreak.flow.filter(swipeAnimProcess);
}
} |
Extend syntax for flow.filter export const allReady = ready.from(
signal.combine(backReady, frontReady)
.view(([back, front]) => back && front)
.flow.filter((f) => f) // to --> .flow.filter()
); |
"filter" and "map" impleneted 0.6.0, "flow" under discussion. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: