UNPKG
time-to-uint8array
Version:
latest (1.0.0)
1.0.0
node module for converting time to Uint8Array
time-to-uint8array
/
index.js
16 lines
(14 loc)
•
269 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** * *
@param
{
number
}
time
*
@returns
Timestamp as Uint8Array */
const
timeToUint8Array
= (
time
) => {
return
new
Uint8Array
( time .
toString
() .
split
(
''
) .
map
(
(
c
) =>
parseInt
(c,
10
)) ); };
export
default
timeToUint8Array;