for-more

Multithread Synchronization Loop. Support Promise.
Install
npm install for-more --save
yarn add for-more
Import
require('for-more')
var forMore = require('for-more')
import 'for-more'
import forMore from 'for-more'
Usage
[1, 2, 3].forMore(2, function(item, index, array) {
return item * 2
})
.then(function(results) {
console.log(results)
})
[1, 2, 3].forMore(2, async function(item, index, array) {
const html = await axios.get('http://www.google.com?q=' + item)
return html.data
}, function(results) {
console.log(results)
})
[1, 2, 3].forMore({
lines: 2,
abort: true
}, async function(item, index, array) {
const html = await axios.get('http://www.google.com?q=' + item)
return html.data
}, function(results) {
console.log(results)
})