UNPKG
rsuite-utils
Version:
canary (1.6.0-beta.1)
latest (2.2.1)
next (2.0.0-alpha.3)
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
2.0.0-alpha.3
2.0.0-alpha.2
2.0.0-alpha.1
2.0.0-alpha.0
1.6.2
1.6.1
1.6.0
1.6.0-beta.1
1.6.0-beta
1.5.2
1.5.1
1.5.0
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-next.9
1.0.0-next.8
1.0.0-next.7
1.0.0-next.6
1.0.0-next.5
1.0.0-next.4
1.0.0-next.3
1.0.0-next.2
1.0.0-next.1
1.0.0-next
0.1.6
0.1.5
0.1.3
0.1.2
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.1
RSUITE Utils
github.com/rsuite/rsuite-utils
rsuite/rsuite-utils
rsuite-utils
/
lib
/
utils
/
isOneOf.js
12 lines
(11 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
default
= isOneOf;
function
isOneOf
(
one, ofTarget
) {
if
(
Array
.
isArray
(ofTarget)) {
return
ofTarget.
indexOf
(one) >=
0
; }
return
one === ofTarget; }