UNPKG

@mswjs/interceptors

Version:

Low-level HTTP/HTTPS/XHR/fetch request interception library.

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