covers-extractor
Version:
This library extract cover from a lot of document formats from exact folder
14 lines (11 loc) • 330 B
JavaScript
/**
* Executes a ForEach command asynchronously.
* @param array {array or pseudo-array type}
* @param callback {callback function}
*/
const asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = asyncForEach;