UI for Zipcoin Blue

for-each.js 367B

12345678910111213
  1. "use strict";
  2. var forOf = require("es6-iterator/for-of")
  3. , isIterable = require("es6-iterator/is-iterable")
  4. , iterable = require("./validate")
  5. , forEach = Array.prototype.forEach;
  6. module.exports = function (target, cb/*, thisArg*/) {
  7. if (isIterable(iterable(target))) forOf(target, cb, arguments[2]);
  8. else forEach.call(target, cb, arguments[2]);
  9. };