Skip to content

tobinbc/chunker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chunker

Very simple package to turn an array into typed chunks.

    import { chunker } from '@tobinbc/chunker'

    const input = [
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
    ];
    let output = chunker<typeof input[0]>(input, 3)
    let expected = [
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9],
        [10, 11]
    ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published