Files
my_site/node_modules/@mswjs/interceptors/src/createRequestId.ts
2026-03-24 14:30:59 +08:00

10 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)
}