JSAPI.info

Array.prototype.flatten »

See documentation for Array.prototype.flatten »
MooTools (1.4.1) - see full source
654
655
656
657
658
659
660
661
662
flatten: function(){
    var array = [];
    for (var i = 0, l = this.length; i < l; i++){
        var type = typeOf(this[i]);
        if (type == 'null') continue;
        array = array.concat((type == 'array' || type == 'collection' || type == 'arguments' || instanceOf(this[i], Array)) ? Array.flatten(this[i]) : this[i]);
    }
    return array;
},