UNPKG
@bherila/react-native-otp-inputs
Version:
latest (7.0.5)
7.0.5
7.0.4
7.0.3
One-time password inputs built in pure JS for React-Native
dsznajder/react-native-otp-inputs
@bherila/react-native-otp-inputs
/
lib
/
module
/
helpers.js
10 lines
(8 loc)
•
271 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
export
const
fillOtpCode
= (
numberOfInputs, value
) => {
const
otpCode = {};
for
(
let
i =
0
; i < numberOfInputs; i++) { otpCode[
`
${i}
`
] = (value ===
null
|| value ===
void
0
?
void
0
: value[i]) ||
''
; }
return
otpCode; };
//# sourceMappingURL=helpers.js.map