Skip to main content

util.timingSafeEqual()

Synchronous timing-safe comparison. Each input: at most 65536 bytes (UTF-8 for strings). Invalid types/options throw TypeError; size/range throws RangeError.

Signature

Example

See all util methods or runtime basics.
Last modified on November 8, 2026