UNPKG
@extra-array/some
Version:
latest (2.10.19)
2.10.19
2.10.18
2.10.17
2.10.16
2.10.15
2.10.14
2.10.13
2.10.12
2.10.11
2.10.10
2.10.9
2.10.8
2.10.7
2.10.6
2.10.5
2.10.4
2.10.2
2.10.1
2.10.0
2.9.64
2.9.63
2.9.62
2.9.61
2.9.60
2.9.59
2.9.58
2.9.57
2.9.56
2.9.55
2.9.54
2.9.53
2.9.52
2.9.51
2.9.50
2.9.49
2.9.48
2.9.47
2.9.46
2.9.45
2.9.44
2.9.43
2.9.42
2.9.41
2.9.40
2.9.39
2.9.38
2.9.37
2.9.36
2.9.35
2.9.34
2.9.33
2.9.32
2.9.31
2.9.30
2.9.29
2.9.28
2.9.27
2.9.26
2.9.25
2.9.24
2.9.23
2.9.22
2.9.12
2.9.11
2.9.10
2.9.9
2.9.8
2.9.7
2.9.6
2.9.5
2.9.4
2.9.3
2.9.2
2.9.1
2.9.0
2.8.76
2.8.75
2.8.74
2.8.73
2.8.72
2.8.71
2.8.70
2.8.69
2.8.67
2.8.66
2.8.65
2.8.64
2.8.62
2.8.61
2.8.60
2.8.59
2.8.58
2.8.57
2.8.56
2.8.55
2.8.54
2.8.53
2.8.52
2.8.51
2.8.50
2.8.49
2.8.48
2.8.47
2.8.46
2.8.45
2.8.44
2.8.43
2.8.42
2.8.41
2.8.40
2.8.39
2.8.38
2.8.37
2.8.36
2.8.35
2.8.34
2.8.33
1.1.7
1.1.6
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.6
1.0.4
1.0.1
1.0.0
Checks if any value satisfies a test.
github.com/nodef/extra-array
nodef/extra-array
@extra-array/some
/
index.mjs
14 lines
(13 loc)
•
268 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function
someBool
(
x
) {
for
(
var
i =
0
, I = x.
length
; i < I; i++)
if
(x[i])
return
true
;
return
false
; }
function
some
(
x, ft =
null
) {
if
(ft)
return
x.
some
(ft);
else
return
someBool
(x); }
export
{ some
as
default
};