UNPKG

time-to-uint8array

Version:

node module for converting time to Uint8Array

16 lines (14 loc) 269 B
/** * * @param {number} time * @returns Timestamp as Uint8Array */ const timeToUint8Array = (time) => { return new Uint8Array( time .toString() .split('') .map((c) => parseInt(c, 10)) ); }; export default timeToUint8Array;