@chatui/core
Version:
The React library for Chatbot UI
15 lines (14 loc) • 656 B
TypeScript
/**
* Returns a string with at least 64-bits of randomness.
*
* Doesn't trust Javascript's random function entirely. Uses a combination of
* random and current timestamp, and then encodes the string in base-36 to
* make it shorter.
*
* From: https://medium.com/este-js-framework/its-ok-to-use-javascript-generated-guid-in-a-browser-373ca6431cf7
* Code: https://github.com/google/closure-library/blob/555e0138c83ed54d25a3e1cd82a7e789e88335a7/closure/goog/string/string.js#L1177
*
* @return {string} A random string, e.g. sn1s7vb4gcic.
*/
export declare function getRandomString(): string;
export declare function reflow(el: HTMLElement): number;