yeps-promisify
v1.1.1
Published
Recursive loop promise generator
Downloads
49
Maintainers
Readme
Recursive loop promise generator for yeps
It helps with looping promises. It's promises middleware realisation.
How to install
npm i -S yeps-promisify
How to use
const promisify = require('yeps-promisify');
async () => {
const context = {};
const promises = [
async (context) => {
// some stuff with context
},
async (context) => {
// some other stuff with context
},
...
];
try {
await promisify(context, promises);
} catch (error) {
// error handler
}
}