From f5db7a8a244f4c0eecb6f922f64bb2bad7561b9c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 31 Jan 2014 11:24:18 -0500 Subject: [PATCH] refactor(util) slice: add count --- lib/util.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/util.js b/lib/util.js index 4c4e4895..77978b5b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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; };