1 define(['./identity', './prop', '../object/deepMatches'], function(identity, prop, deepMatches) {
4 * Converts argument into a valid iterator.
5 * Used internally on most array/object/collection methods that receives a
6 * callback/iterator providing a shortcut syntax.
8 function makeIterator(src, thisObj){
14 // function is the first to improve perf (most common case)
15 // also avoid using `Function#call` if not needed, which boosts
16 // perf a lot in some cases
17 return (typeof thisObj !== 'undefined')? function(val, i, arr){
18 return src.call(thisObj, val, i, arr);
22 return deepMatches(val, src);