Skip to content

Commit b4d159c

Browse files
committed
fix: array chunk of size = 1
1 parent 853702c commit b4d159c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/chunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function chunk<T>(array: T[], size: number): T[][] {
2-
if (size <= 1) {
2+
if (size < 1) {
33
return [array];
44
}
55
const result: T[][] = [];

src/nodes/Array.Chunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type P = {
1010
type R = unknown[];
1111

1212
export const module: ModuleDefinition<P, R> = {
13-
version: '1.0.2',
13+
version: '1.0.3',
1414
moduleName: 'Array / Chunk',
1515
description: `
1616
Creates an array of items split into sub-arrays of specified size.

0 commit comments

Comments
 (0)