mirror of
https://github.com/cp6/my-idlers.git
synced 2025-04-21 18:48:37 +00:00
11 lines
369 B
JavaScript
Vendored
11 lines
369 B
JavaScript
Vendored
"use strict";
|
|
|
|
var forOf = require("es6-iterator/for-of")
|
|
, isIterable = require("es6-iterator/is-iterable")
|
|
, iterable = require("./validate")
|
|
, forEach = Array.prototype.forEach;
|
|
|
|
module.exports = function (target, cb/*, thisArg*/) {
|
|
if (isIterable(iterable(target))) forOf(target, cb, arguments[2]);
|
|
else forEach.call(target, cb, arguments[2]);
|
|
};
|