UNPKG

@s-awaken/lotide

Version:

Syrym's project for Lighthouse Labs Bootcamp

13 lines (12 loc) 240 B
const takeUntil = function(array, callback) { const result = []; for (const item of array) { if (callback(item)) { return result; } else { result.push(item); } } return result; }; module.exports = takeUntil;