snofa
Snomiao's Functional Async pipelines with typescript support.
Usage
// sync functional pipeline
// apply functions from left to right
snof(12, (v) => v * 12); // === 144
snof((v: number) => v * 12)(12); // === 144
snof(
() => 12,
(v) => v * 12,
)(); // === 144
snof(
() => 12,
snof((v) => v * 12),
)(); // === 144
// async functional pipeline
// apply functions from left to right
// it's not nessary to use await in nested snofa
await snofa(12, (v) => v * 12); // === 144
await snofa((v: number) => v * 12)(12); // === 144
await snofa(
() => 12,
(v) => v * 12,
); // === 144
await snofa(
() => 12,
snofa((v) => v * 12),
)(); // === 144
Reference
About
License
GPLv3 - The GNU General Public License v3.0 - GNU Project - Free Software Foundation
Author
Author: snomiao snomiao@gmail.com Website: snomiao.com
Sponsors
- None yet.
Claim your sponsorship by donating snomiao <Email: snomiao@gmail.com>
Contribute
The main repo is in here, any issue and PR's welcome.