===.
It has the same signature as Node’s
crypto.timingSafeEqual.
Example: Verifying a webhook signature
src/app/webhooks/signed-event.webhook.ts
API
timingSafeEqual(a, b): boolean
Returns true when both buffers hold the same bytes.
Parameters
Errors
- Throws a
RangeErrorwhenaandbhave different byte lengths. - Throws a
TypeErrorwhen either input is not anArrayBufferor a view, such as a string.