3.0.2 • Published 4 years ago

split-with v3.0.2

Weekly downloads
46
License
ISC
Repository
github
Last release
4 years ago

Build Status

split-with

Returns an array of takeWhile(coll, pred), dropWhile(coll, pred)

function splitWith(coll, pred, ctx) { }

Install

npm i -S split-with

Usage

var assert = require('assert');
var splitWith = require('split-with');
var is = require('is-predicate');

function gtEq3(val) {
  return is.greaterEq(3, val);
}

var arr = [1, 2, 3, 4, 5];
var expected = [[1, 2, 3], [4, 5]];

assert.deepEqual(splitWith(arr, gtEq3), expected); // true
3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.0

5 years ago

1.0.0

10 years ago