UNPKG

tedb

Version:

TypeScript Embedded Database

28 lines (27 loc) 797 B
/** * Tuple of 4 Uint8Arrays representing 4 serialized Long Unsigned Integers */ export declare type ByteBuffer = [Uint8Array, Uint8Array, Uint8Array, Uint8Array]; /** * Decodes the Hash into a ByteBuffer * @param str * @returns {ByteBuffer} */ export declare const decode: (str: string) => [Uint8Array, Uint8Array, Uint8Array, Uint8Array]; /** * Encodes a ByteBuffer into a Hash * @param buffer * @returns {string} */ export declare const encode: (buffer: [Uint8Array, Uint8Array, Uint8Array, Uint8Array]) => string; /** * Encodes a Hash for a UUID based on date and random numbers * @returns {string} */ export declare const getUUID: () => string; /** * Retrieve the creation Date from the id * @param id * @returns {Date} */ export declare const getDate: (id: string) => Date;