chunkd
Get a chunk of an array based on the total number of chunks and current index
Last updated 6 years ago by thejameskyle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install chunkd 
SYNC missed versions from official npm registry.

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]

Current Tags

  • 2.0.1                                ...           latest (5 years ago)

3 Versions

  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE