List of utility methods to do Array Skip
skip(count)Array.prototype.skip = function (count) { return this.slice(count); }; | |
skip(skipNumber)Array.prototype.skip = function(skipNumber){ return this.slice(skipNumber); }; | |
skipUntil(fun)Array.prototype.skipUntil = function (fun) { var result = new Array(), index = 0; while (!fun(this[index])) { index++; return this.skip(index); }; | |
skipWhile(fun)Array.prototype.skipWhile = function (fun) { var result = new Array(), index = 0; while (fun(this[index])) { index++; return this.skip(index); }; | |
skipWhile(predicate)Array.prototype.skipWhile = function (predicate) { predicate = predicate || Predicate; var l = this.length; var i = 0; for (i = 0; i < l; i++) if (predicate(this[i], i) === false) break; return this.skip(i); }; |