README

A lightweight (3.5kB) cross-platform Promises/A+ spec compliant promise library. Vachan works both on the Browser and Node.js. Vachan provides extra features over the standard promise implementation
such as monitoring the complete internal chaining and rechaining of promises, queuing of callbacks and execution of callbacks, mode of execution and other functional and utilitarian features and also gives you polyfills for ESNext functions - any
and allSettled
. This project was partly a fruition of exploring promises from the perspective of an implementor and also in an effort to create a core ecosystem of libraries, constructs and utilities which can be reused across domains.
Example Usage
const { P } = require("vachan");
let a = [];
for(let i = 0;i < 10;i++)
{
a.push(
P.resolve(i*10)
.delay(.1*i)
);
}
P.all(a)
.then(vals => console.log(vals));
Installation
Node
npm i vachan
Browser
<script src="https://unpkg.com/vachan"></script>
Browser Optimized (gzipped)
<script src="https://unpkg.com/vachan/dist/browser/vachan.dist.min.js.gz"></script>