Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

split-every

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
27
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
A year ago
SIZE
1 KB
Splits a collection into slices of the specified length.
1 contributor
Install split-every as a package?
Copied
npm i @bit/ramda.ramda.split-every
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
  1,
  2,
  3,
  4,
  5,
  6,
  7,
]);
modifieddraft
chevron_left
chevron_right
splitEvery (
n:Number,
list:Array
) : Array

Splits a collection into slices of the specified length.

Example
R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]]
     R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz']
Arguments
n: Number
list: Array
Returns
Array