(arr, cb, context)
| 356 | return typeof data.length === 'number'; |
| 357 | } |
| 358 | function each(arr, cb, context) { |
| 359 | if (!(arr && cb)) { |
| 360 | return; |
| 361 | } |
| 362 | if (arr.forEach && arr.forEach === nativeForEach) { |
| 363 | arr.forEach(cb, context); |
| 364 | } |
| 365 | else if (arr.length === +arr.length) { |
| 366 | for (var i = 0, len = arr.length; i < len; i++) { |
| 367 | cb.call(context, arr[i], i, arr); |
| 368 | } |
| 369 | } |
| 370 | else { |
| 371 | for (var key in arr) { |
| 372 | if (arr.hasOwnProperty(key)) { |
| 373 | cb.call(context, arr[key], key, arr); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | function map(arr, cb, context) { |
| 379 | if (!arr) { |
| 380 | return []; |
no outgoing calls
no test coverage detected
searching dependent graphs…