We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
await
pipe()
It would be nice if await could be used within a pipe.
const doAwait = Symbol(); const pipe = (val, ...fns) => { while (fns.length > 0) { const fn = fns.shift() if (fn === doAwait) { return Promise.resolve(val).then((val_) => pipe(val_, ...fns)); } else { val = fn(val); } } return val; };
This could even be generalized and use a special trait and made to work in compose…
Using a new new function doAwait instead of the normal await is not terribly pretty, but can be done.
doAwait
The text was updated successfully, but these errors were encountered:
Superseeded by #138
Sorry, something went wrong.
No branches or pull requests
It would be nice if await could be used within a pipe.
This could even be generalized and use a special trait and made to work in compose…
Using a new new function
doAwait
instead of the normal await is not terribly pretty, but can be done.The text was updated successfully, but these errors were encountered: