chore: simplify honeycomb alerts (#26142)

This commit is contained in:
Victor Navarro 2026-05-07 09:56:10 +02:00 committed by GitHub
commit f8aa4a3be0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 185 additions and 408 deletions

View file

@ -0,0 +1,8 @@
import { timingSafeEqual } from "node:crypto"
export function safeEqual(a: string, b: string): boolean {
const encoder = new TextEncoder()
const aBytes = encoder.encode(a)
const bBytes = encoder.encode(b)
return aBytes.length === bBytes.length && timingSafeEqual(aBytes, bBytes)
}