Compose Promises with Logic Gate
Semantics
"Forget APIs, remember logic." PromiseLogic provides intuitive logical gate semantics for Promise composition.
npm install promise-logic7+
Logic Gates
100%
TypeScript
0
Dependencies
∞
Possibilities
AND Gate
Inputs:
→Output
3真/0假
javascript
// AND gate - succeeds when all Promises succeed
const result = await PromiseLogic.and([
Promise.resolve('Task 1'),
Promise.resolve('Task 2'),
Promise.resolve('Task 3')
])
console.log('All tasks completed:', result)
✓ Succeeded
Output is true only when all inputs are true
Try It Live
Edit the code below and see PromiseLogic in action. Experience the power of logical gate semantics firsthand.
JAVASCRIPT
Loading...
Why PromiseLogic?
Designed for developers who want to work with asynchronous operations using familiar logic concepts
Logic-Gate Semantics
Compose Promises using AND, OR, XOR and other logic-gate concepts for more intuitive async programming
Dual-Mode API
Supports both static class methods and factory functions to suit different development scenarios
Type Safety
Full TypeScript support with excellent developer experience and code hints
Production Ready
Rigorously tested and tree-shakeable, ready for production environments