Example: check if a number is multiple of 1000. Will log on 1000,2000,3000...
1resource.model.find(query).cursor().eachAsync(function (doc) { 2 docIndex++; 3 if((docIndex % 1000) === 0) { 4 console.log(`hitted ${docIndex}`) 5 } 6})
Created on 2/6/2019