@odoo/o-spreadsheet
Version:
A spreadsheet component
19 lines (18 loc) • 868 B
TypeScript
export declare class UuidGenerator {
private getCrypto;
/**
* Generates a custom UUID using a simple 36^12 method (8-character alphanumeric string with lowercase letters)
* This has a higher chance of collision than a UUIDv4, but not only faster to generate than an UUIDV4,
* it also has a smaller size, which is preferable to alleviate the overall data size.
*
* This method is preferable when generating uuids for the core data (sheetId, figureId, etc)
* as they will appear several times in the revisions and local history.
*
*/
smallUuid(): string;
/**
* Generates an UUIDV4, has astronomically low chance of collision, but is larger in size than the smallUuid.
* This method should be used when you need to avoid collisions at all costs, like the id of a revision.
*/
uuidv4(): string;
}