drop-while

3.0.0 • Public • Published

Build Status

drop-while

Returns an array of the items in coll starting from the first item for which pred(item) logical false, i.e. false, null, undefined

function dropWhile(coll, pred, ctx) {}

Install

npm i -S drop-while

Usage

var assert = require('assert');
var dropWhile = require('drop-while');
var is = require('is-predicate');
 
var arr = [-1, -2, -6, -7, 1, 2, 3, 4, -5, -6, 0, 1];
var expect = [1, 2, 3, 4, -5, -6, 0, 1];
assert.deepEqual(dropWhile(arr, is.neg), expect); // true

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    3
  • 2.0.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i drop-while

Weekly Downloads

5

Version

3.0.0

License

ISC

Unpacked Size

3.42 kB

Total Files

5

Last publish

Collaborators

  • landau