@tobinbc/chunker
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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]
    ]

Readme

Keywords

Package Sidebar

Install

npm i @tobinbc/chunker

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

180 kB

Total Files

8

Last publish

Collaborators

  • tobinbc