UNPKG
@ahsolo/lotide
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
lotide assignment for Lighthouse Labs coding bootcamp
github.com/ahSOLO/lotide
ahSOLO/lotide
@ahsolo/lotide
/
takeUntil.js
12 lines
(11 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
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;