UNPKG

@ahsolo/lotide

Version:

lotide assignment for Lighthouse Labs coding bootcamp

12 lines (11 loc) 221 B
const takeUntil = function(array, callback) { let output = []; for (let value of array) { if (!callback(value)) { output.push(value); } else break; } return output; } module.exports = takeUntil;