refactor(util) slice: add count

This commit is contained in:
coderaiser 2014-01-31 11:24:18 -05:00
parent 2a24cbb64a
commit f5db7a8a24

View file

@ -851,14 +851,11 @@
*
* @param array
*/
this.slice = function(array) {
this.slice = function(array, count) {
var ret;
array = arguments[0];
[].shift.apply(arguments);
if (array)
ret = [].slice.apply(array, arguments);
ret = [].slice.apply(array, count);
return ret;
};