8000 Improve naming on limitBy offset · zhangking/vue@6da832b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6da832b

Browse files
committed
Improve naming on limitBy offset
1 parent 916298c commit 6da832b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/filters/array-filters.js

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

12-
exports.limitBy = function (arr, n, off) {
13-
off = off ? parseInt(off, 10) : 0
12+
exports.limitBy = function (arr, n, offset) {
13+
offset = offset ? parseInt(offset, 10) : 0
1414
return typeof n === 'number'
15-
? arr.slice(off, off + n)
15+
? arr.slice(offset, offset + n)
1616
: arr
1717
}
1818

0 commit comments

Comments
 (0)
0