MCPcopy Index your code
hub / github.com/mailru/FileAPI / _each

Function _each

lib/FileAPI.core.js:77–94  ·  view source on GitHub ↗
(obj, fn, ctx)

Source from the content-addressed store, hash-verified

75 * Iterate over a object or array
76 */
77 _each = function (obj, fn, ctx){
78 if( obj ){
79 if( _isArray(obj) ){
80 for( var i = 0, n = obj.length; i < n; i++ ){
81 if( i in obj ){
82 fn.call(ctx, obj[i], i, obj);
83 }
84 }
85 }
86 else {
87 for( var key in obj ){
88 if( obj.hasOwnProperty(key) ){
89 fn.call(ctx, obj[key], key, obj);
90 }
91 }
92 }
93 }
94 },
95
96 /**
97 * Merge the contents of two or more objects together into the first object

Callers 8

FileAPI.Flash.jsFile · 0.85
_inheritFunction · 0.85
_extendFunction · 0.85
_onFunction · 0.85
_offFunction · 0.85
FileAPI.core.jsFile · 0.85
_simpleCloneFunction · 0.85

Calls 1

_isArrayFunction · 0.85

Tested by

no test coverage detected