@extra-array/drop-while
@extra-array/drop-while
npm i @extra-array/drop-while
@extra-array/drop-while

@extra-array/drop-while

A collection of functions for working with Arrays.

by nodef

2.10.19 (see all)License:MITTypeScript:Built-In
npm i @extra-array/drop-while
Readme

Discards values from left, while a test passes. 📦 😺 🏃‍♂️ 📼 🌔 📜 📰 📘

Alternatives: drop, dropRight, dropWhile, dropWhileRight.
Similar: take, drop.

This is part of package extra-array.


array.dropWhile(x, ft);
// x:  an array
// ft: test function (v, i, x)
const array = require("extra-array");

var x = [1, 2, 3, 4, 5];
array.dropWhile(x, v => v < 3);
// [ 3, 4, 5 ]

array.dropWhile(x, v => v < 4);
// [ 4, 5 ]


References

No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate