(uniqueKey: string)
| 25 | * Creates a standard request ID (same as Platform). |
| 26 | */ |
| 27 | export function uniqueKeyToRequestId(uniqueKey: string): string { |
| 28 | const str = createHash('sha256') |
| 29 | .update(uniqueKey) |
| 30 | .digest('base64') |
| 31 | .replace(/(\+|\/|=)/g, ''); |
| 32 | |
| 33 | return str.length > REQUEST_ID_LENGTH ? str.slice(0, REQUEST_ID_LENGTH) : str; |
| 34 | } |
| 35 | |
| 36 | export function isBuffer(value: unknown): boolean { |
| 37 | try { |
no test coverage detected
searching dependent graphs…