Skip to content

Commit 916298c

Browse files
committed
Simplyfy new offset filter code
1 parent 7f35827 commit 916298c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/filters/array-filters.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ var toArray = require('../directives/public/for')._postProcess
99
* @param {Number} offset (Decimal expected)
1010
*/
1111

12-
exports.limitBy = function (arr, n, offset) {
13-
var off = (!offset)
14-
? 0
15-
: parseInt(offset, 10)
12+
exports.limitBy = function (arr, n, off) {
13+
off = off ? parseInt(off, 10) : 0
1614
return typeof n === 'number'
1715
? arr.slice(off, off + n)
1816
: arr

0 commit comments

Comments
 (0)