Walk recursive

@param {Array} array
@param {Function} callback
@returns {Boolean}
@private
555252
function walkRecursive(array, callback) {
	for (var i = 0, c = array.length; i < c; i++) {
		if (_.isObject(array[i].f)) {
			if (walkRecursive(array[i].f, callback) === false) {
				return false;
			}
		} else if (callback(array[i], i, array) === false) {
			return false;
		}
	}
}
800295
function(array, n) {
      var ret = [];
      var sz = _.size(array);

      if (n <= 0) return [];
      if (n === 1) return array;

      for(var index = 0; index < sz; index += n) {
        ret.push(array[index]);
      }

      return ret;
    }
525578
function( key /* or array */, callback ) {
            var me = this;
            if ( this.isArray( key ) ) {
                var values = [];
                for ( var i = 0, il = key.length; i < il; i++ ) {
                    me.get( key[i], function( result ) {
                        if ( result ) values.push( result );
                        if ( values.length === il && callback ) {
                            me.lambda( callback ).call( me, values );
                        }
                    });
                }
            } else {
                var error = function(e) { fail( e ); if ( callback ) me.lambda( callback ).call( me ); };
                root( this, function( store ) {
                    store.getFile( key, {create:false}, function( entry ) {
                        entry.file(function( file ) {
                            var reader = new FileReader();

                            reader.onerror = error;

                            reader.onload = function(e) {
                                if ( callback ) me.lambda( callback ).call( me, JSON.parse( e.target.result ) );
                            };

                            reader.readAsText( file );
                        }, error );
                    }, error );
                });
            }
            return this;
        }
1224655
private function array_walk(&$original, $callback, $userdata = [])
    {
        $resolved = (array)$original;

        array_walk($resolved, $callback, $userdata);

        if(count((array)$original) == 1) $resolved = reset($resolved);

        $original = $resolved;
    }
965649
function walk(dom, fn) {
  if (dom) {
    // stop the recursion
    if (fn(dom) === false) return
    else {
      dom = dom.firstChild

      while (dom) {
        walk(dom, fn)
        dom = dom.nextSibling
      }
    }
  }
}
807368
function each(object, callback) {
		if (!object) { return true; }
		if (object.forEach) { return object.forEach(callback); }
		if (object instanceof Array) {
			var	length	= array ? array.length : 0;
			for(var index = 0; index < length; index++) {
				callback(array[index], index);
			}
		}else{
			for(var key in object) {
				if (!object.hasOwnProperty(key)) { continue; }
				callback(object[key], key);
			}
		}
		return false;
	}
983248
function (target, path, traverseArrays) {
      
      // if traversing arrays is enabled and this is an array, loop
      // may be a "array-like" node list (or similar), in which case it needs to be converted
      if (traverseArrays && Sysmo.isArrayLike(target)) {
        
        target = Sysmo.makeArray(target);
        
        var children = [];
        
        for (var i = 0; i < target.length; i++) {
          // recursively loop through children
          var child = Sysmo.getDeepValue(target[i], path, traverseArrays);
          
          // ignore if undefined
          if (typeof child != "undefined") {
            //flatten array because the original path points to one flat result set
            if (Sysmo.isArray(child)) {
              
              for (var j = 0; j < child.length; j++) {
                children.push(child[j]);
              }
              
            } else {
              
              children.push(child);
              
            }
          }
        }
        
        return (children.length) ? children : void(0);
      }
      
      var invoke_regex = /\(\)$/,
          properties = path.split('.'),
          property;

      if (target != null && properties.length) {
        
        var propertyName = properties.shift(),
            invoke = invoke_regex.test(propertyName)
        
        if (invoke) {
          propertyName = propertyName.replace(invoke_regex, "");
        }
        
        if (invoke && propertyName in target) {
          target = target[propertyName]();
        } else {
          target = target[propertyName];
        }
        
        path = properties.join('.');
        
        if (path) {
          target = Sysmo.getDeepValue(target, path, traverseArrays);
        }
      }
      
      return target;
    }
161403
function walk(data, path, result, key) {
    var fn;

    switch (type(path)) {
      case 'string':
        fn = seekSingle;
        break;

      case 'array':
        fn = seekArray;
        break;

      case 'object':
        fn = seekObject;
        break;
    }

    if (fn) {
      fn(data, path, result, key);
    }
  }
1312757
function(index)
  {
    //Check the index value
    if(index >= keys.length)
    {
      //Do the callback and exit
      return cb(null);
    }
    else
    {
      //Get the key
      var key = (is_array) ? index : keys[index];

      //Get the value
      var value = list[key];

      //Call the provided method with the element of the array
      return fn.call(null, key, value, function(error)
      {
        //Check the error
        if(error)
        {
          //Do the callback with the provided error
          return cb(error);
        }
        else
        {
          //Continue with the next item on the list
          return each_async(index + 1);
        }
      });
    }
  }
1056242
function every(object, callback) {
		if (!object) { return true; }
		if (object.every) { return object.every(callback); }
		if (object instanceof Array) {
			var	length	= array ? array.length : 0;
			for(var index = 0; index < length; index++) {
				if (!callback(array[index], index)) { return false; }
			}
		}else{
			for(var key in object) {
				if (!object.hasOwnProperty(key)) { continue; }
				if (!callback(object[key], key)) { return false; }
			}
		}
		return true;
	}
1187031
function(callback){
              [].every.call(this, function(el, idx){
                return callback.call(el, idx, el) !== false
              })
              return this
            }
619546
function walkTree(directory, callback) {
    callback(directory);
    directory.directories.forEach(childDirectory => walkTree(childDirectory, callback));
}
484728
public static function clean( $array = null, $callback = null )
    {
        $_result = ( empty( $array ) ? array() : ( !is_array( $array ) ? array($array) : $array ) );

        if ( null === $callback || !is_callable( $callback ) )
        {
            return $_result;
        }

        $_response = array();

        foreach ( $_result as $_item )
        {
            $_response[] = call_user_func( $callback, $_item );
        }

        return $_response;
    }
518288
function (callback) {
            return this.walk_down(function (depth, node, output, depth_first) {
                if (!depth_first) {
                    for (var n = 0; n < depth; n++)
                        output += "    ";
                    output += "\"" + node.name() + "\"";
                    if (typeof callback === "function")
                        output += ": " + callback(node);
                    output += "\n";
                }
                return output;
            }, "");
        }
768248
function(callback)
    {
        var self = this, items = [];
        
        var append = function(err, item) {
            if (err)
            {
                return callback(err);
            }
            if (item)
            {
                items.push(item);
                self.next(append);
            }
            else
            {
                callback(null, items);
            }
        };
        
        this.next(append);
    }
1351060
function (callback, ctx) {
            var _walk = function (depth, node, ctx) {
                if (typeof callback === "function")
                    ctx = callback(depth, node, ctx, false);
                var children = node.children();
                for (var i = 0; i < children.length; i++)
                    ctx = _walk(depth + 1, children[i], ctx);
                if (typeof callback === "function")
                    ctx = callback(depth, node, ctx, true);
                return ctx;
            };
            ctx = _walk(0, this, ctx);
            return ctx;
        }
279467
function doArrayWalk(key, value, walkArrays, walkArraysMatchingKeys) {
  if (!Array.isArray(value)) {
    return false;
  }

  if (walkArrays || (walkArraysMatchingKeys && walkArraysMatchingKeys.includes(key))) {
    return true;
  }

  return false;
}