9 lines
209 B
TypeScript
9 lines
209 B
TypeScript
/**
|
|
* Generate a random ID string to represent a request.
|
|
* @example
|
|
* createRequestId()
|
|
* // "f774b6c9c600f"
|
|
*/
|
|
export function createRequestId(): string {
|
|
return Math.random().toString(16).slice(2)
|
|
}
|