UNPKG

1.06 kBTypeScriptView Raw
1export type Binary = Buffer | NodeJS.TypedArray | DataView;
2export type BinaryLike = string | Binary;
3export declare const BASE_UUID = "-0000-1000-8000-0026BB765291";
4export declare function generate(data: BinaryLike): string;
5export declare function isValid(UUID: string): boolean;
6/**
7 * Parses the uuid as a string from the given Buffer.
8 * The parser will use the first 8 bytes.
9 *
10 * @param buf - The buffer to read from.
11 */
12export declare function unparse(buf: Buffer): string;
13/**
14 * Parses the uuid as a string from the given Buffer at the specified offset.
15 * @param buf - The buffer to read from.
16 * @param offset - The offset in the buffer to start reading from.
17 */
18export declare function unparse(buf: Buffer, offset: number): string;
19export declare function write(uuid: string): Buffer;
20export declare function write(uuid: string, buf: Buffer, offset: number): void;
21export declare function toShortForm(uuid: string, base?: string): string;
22export declare function toLongForm(uuid: string, base?: string): string;
23//# sourceMappingURL=uuid.d.ts.map
\No newline at end of file