chunkd

Get a chunk of an array based on the total number of chunks and current index

MIT 3 个版本
安装
npm install chunkd
yarn add chunkd
pnpm add chunkd
bun add chunkd
README

chunkd

Get a chunk of an array based on the total number of chunks and current index

Install

yarn add [--dev] chunkd

Example

const chunkd = require("chunkd")

chunkd([1, 2, 3, 4], 0, 3) // [1, 2]
chunkd([1, 2, 3, 4], 1, 3) // [3]
chunkd([1, 2, 3, 4], 2, 3) // [4]
版本列表
2.0.1 2019-12-05
2.0.0 2019-11-20
1.0.0 2018-09-26