human-form

1.0.2 • Public • Published

tea-chunk-js

tea-chunk-js is designed to be simple and straightforward, similar to the _.chunk function in lodash, but as a standalone module with no dependencies, making it perfect for projects where you want to keep your bundle size small.

Installation

To install tea-chunk-js, use npm or yarn:

npm install tea-chunk-js
# OR
yarn add tea-chunk-js

Usage

Import tea-chunk-js into your project and use it to split an array into smaller arrays of a specified size:

const chunk = require("tea-chunk-js");

// Example array
const myArray = [1, 2, 3, 4, 5, 6];

// Split into chunks of 2
const result = chunk(myArray, 2);

// Output: [[1, 2], [3, 4], [5, 6]]
console.log(result);

Readme

Keywords

none

Package Sidebar

Install

npm i human-form

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

3.85 kB

Total Files

6

Last publish

Collaborators

  • milizhai