mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-18 21:54:17 +00:00
replace NodeJS buffer with Uint8Array
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import chunk from '../chunk';
|
||||
|
||||
export default (timestamp: bigint): Buffer => {
|
||||
const buf = Buffer.alloc(8);
|
||||
buf.writeBigUInt64LE(BigInt(timestamp));
|
||||
return chunk(0x0006, buf, false);
|
||||
export default (timestamp: bigint): Uint8Array => {
|
||||
const buf = new DataView(new ArrayBuffer(8));
|
||||
buf.setBigUint64(0, BigInt(timestamp), true);
|
||||
return chunk(0x0006, new Uint8Array(buf.buffer), false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user