UNPKG

@tommymynnson/lotide

Version:

A mini clone of the [Lodash](https://lodash.com) library.

13 lines (11 loc) 209 B
const takeUntil = (array, callback) => { let result = []; for (const x of array) { if (!callback(x)) { result.push(x); } else { return result; } } }; module.exports = takeUntil;