UNPKG

async-array-iterator

Version:

a simple asyncronous iterator which can simplify processing arrays before assigning final arguments

22 lines (11 loc) 283 B
var aai = require('../') console.log('running test suite 1... \n') var arrData = [1, 2, 3]; function iter(array, index, callback){ var newVal = array[index] + 'add' callback(newVal) } function exec(res){ console.log(res) } aai(arrData, iter, exec)