Popularity
0.3
Declining
Activity
5.7
-
9
1
0
Description
Promise wrapper with some sugar
Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Latest version: v2.4.5
OF alternatives and similar libraries
Based on the "Control Flow" category.
Alternatively, view OF alternatives based on common mentions on social networks and blogs.
-
modern-async
A modern JavaScript tooling library for asynchronous operations using async/await and promises -
ObjectEventTarget
Provide a prototype that add support to event listeners (with same behavior of EventTarget from DOMElements available on browsers). -
sporadic
Composable concurrency abstractions (such as streams, coroutines and Go-like channels) on top of promises, for Node and browser engines.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of OF or a related project?
Popular Comparisons
README
π‘ππ¬ O F π‘ππ¬
Syntactic sugar for asynchronous functions, promises, generators and synchronous functions.
Deno version of module - π¬π¦ DenOf π¬π¦.
[OF](docs/example.webp?raw=true "OF")
π¬ Usage
import { ofAnyCase } from "@r37r0m0d3l/of";
const promise = () => new Promise((resolve, _reject) => {
resolve({ data: true });
});
const config = {
defaults: "π€· Default value in case of error",
error: new Error("π Custom error, replaces thrown error"),
retries: 3, // π Third time's a charm
timeout: 1000, // β±οΈ Delay before timeout error
};
// no error thrown
const [result, error] = await ofAnyCase(promise(), config);
console.log(result); // { data: true }
console.warn(error); // no error thrown, so it's undefined
πΊοΈ Discover more
<!-- Badges -->