UNPKG

@b1u3too/lotide

Version:

LHL Web Development Flex Program Project -- Helper function library inspired by lodash

10 lines (9 loc) 208 B
const takeUntil = function(array, callback) { for (let i = 0; i < array.length; i++) { if (callback(array[i])) { return array.slice(0, i); } } return array; }; module.exports = takeUntil;