Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Commit 1467b2a

Browse files
committed
Polishing
1 parent 1dc25bd commit 1467b2a

File tree

6 files changed

+401
-26
lines changed

6 files changed

+401
-26
lines changed

.travis.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
sudo: false
2+
23
language: node_js
4+
35
node_js:
4-
- 'iojs'
5-
- '0.12'
6-
- '0.10'
6+
- '4'
7+
8+
cache:
9+
directories:
10+
- "node_modules"
11+
12+
install:
13+
- npm install
14+
15+
script:
16+
- npm test

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ module.exports = function (arr, size) {
1313

1414
var chunk = [];
1515
for (var i = 0, l = arr.length, group; i < l; i++) {
16-
if (!(i % size)) {
17-
group = []
18-
chunk.push(group)
16+
if (i % size == 0) {
17+
group = [];
18+
chunk.push(group);
1919
}
20-
group.push(arr[i])
20+
group.push(arr[i]);
2121
}
2222

2323
return chunk;

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) drKraken <kuchuklehjs@gmail.com> (drkraken.github.io)
3+
Copyright (c) Oleh Kuchuk <kuchuklehjs@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)