mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-02 21:45:14 +01:00
chore(utils): add getChunkSize to bufferUtils
This commit is contained in:
@@ -9,3 +9,9 @@ export const reverseBuffer = (src: Buffer) => {
|
||||
}
|
||||
return buffer;
|
||||
};
|
||||
|
||||
export const getChunkSize = (n: number) => {
|
||||
const buf = Buffer.allocUnsafe(1);
|
||||
buf.writeUInt8(n);
|
||||
return buf;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user