src/js/libs/spiritual-gui.js
function arrays() {
		extend(Array, {
			every: function every(array, fun, thisp) {
				var res = true,
					len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						if (!fun.call(thisp, array[i], i, array)) {
							res = false;
							break;
						}
					}
				}
				return res;
			},
			forEach: function forEach(array, fun, thisp) {
				var len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						fun.call(thisp, array[i], i, array);
					}
				}
			},
			map: function map(array, fun, thisp) {
				var m = [],
					len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						m.push(fun.call(thisp, array[i], i, array));
					}
				}
				return m;
			},
			filter: function map(array, fun, thisp) {
				return Array.prototype.filter.call(array, fun, thisp);
			},
			isArray: function isArray(o) {
				return Object.prototype.toString.call(o) === "[object Array]";
			},
			concat: function(a1, a2) {
				function map(e) {
					return e;
				}
				return this.map(a1, map).concat(this.map(a2, map));
			}
		});
	}
function arrays() {
		extend(Array, {
			every: function every(array, fun, thisp) {
				var res = true,
					len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						if (!fun.call(thisp, array[i], i, array)) {
							res = false;
							break;
						}
					}
				}
				return res;
			},
			forEach: function forEach(array, fun, thisp) {
				var len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						fun.call(thisp, array[i], i, array);
					}
				}
			},
			map: function map(array, fun, thisp) {
				var m = [],
					len = array.length >>> 0;
				for (var i = 0; i < len; i++) {
					if (array[i] !== undefined) {
						m.push(fun.call(thisp, array[i], i, array));
					}
				}
				return m;
			},
			filter: function map(array, fun, thisp) {
				return Array.prototype.filter.call(array, fun, thisp);
			},
			isArray: function isArray(o) {
				return Object.prototype.toString.call(o) === "[object Array]";
			},
			concat: function(a1, a2) {
				function map(e) {
					return e;
				}
				return this.map(a1, map).concat(this.map(a2, map));
			}
		});
	}
function arrays ( ) { extend ( Array , { every : function every ( array , fun , thisp ) { var res = true , len = array . length >>> 0 ; for ( var i = 0 ; i < len ; i ++ ) { if ( array [ i ] !== undefined ) { if ( ! fun . call ( thisp , array [ i ] , i , array ) ) { res = false ; break ; } } } return res ; } , forEach : function forEach ( array , fun , thisp ) { var len = array . length >>> 0 ; for ( var i = 0 ; i < len ; i ++ ) { if ( array [ i ] !== undefined ) { fun . call ( thisp , array [ i ] , i , array ) ; } } } , map : function map ( array , fun , thisp ) { var m = [ ] , len = array . length >>> 0 ; for ( var i = 0 ; i < len ; i ++ ) { if ( array [ i ] !== undefined ) { m . push ( fun . call ( thisp , array [ i ] , i , array ) ) ; } } return m ; } , filter : function map ( array , fun , thisp ) { return Array . prototype . filter . call ( array , fun , thisp ) ; } , isArray : function isArray ( o ) { return Object . prototype . toString . call ( o ) === "[object Array]" ; } , concat : function ( a1 , a2 ) { function map ( e ) { return e ; } return this . map ( a1 , map ) . concat ( this . map ( a2 , map ) ) ; } } ) ; }
Patching arrays.
Patching arrays .