deno.land / x / pg_mem@2.8.1 / misc / buffer-node.ts

buffer-node.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export type TBuffer = Buffer;

export function bufToString(buf: TBuffer): string { return buf?.toString('utf-8');}
export function bufCompare(a: TBuffer, b: TBuffer) { return Buffer.compare(a, b);}
export function bufFromString(str: string) { return Buffer.from(str);}
export function isBuf(v: any): v is TBuffer { return Buffer.isBuffer(v);}
export function bufClone(buf: TBuffer): TBuffer { const bufcopy = Buffer.alloc(buf.length); buf.copy(bufcopy); return bufcopy;}
pg_mem

Version Info

Tagged at
4 months ago