Skip to content

Instantly share code, notes, and snippets.

@shimdh
Last active August 29, 2015 13:58
Show Gist options
  • Save shimdh/10376952 to your computer and use it in GitHub Desktop.
Save shimdh/10376952 to your computer and use it in GitHub Desktop.
Fast forEach method than native method in Node.js
"use strict";
module.exports = function(obj, func, context) {
var kIndex,
length;
for (kIndex = 0, length = obj.length; kIndex < length; kIndex++) {
func.call(context, obj[kIndex], kIndex, obj);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment