Validation Utilities
Fast validators for emails, URLs, UUIDs, JSON strings, and TypeScript type guards in sc-fns/validation.
The sc-fns/validation module contains zero-dependency validators and strict TypeScript type guards.
ts
isEmail
Validates email addresses using standard RFC 5322 pattern matching.
Signature
ts
Examples
ts
isURL
Validates absolute web URLs using the native URL API. Supports custom protocol whitelists.
Signature
ts
Examples
ts
isUUID
Validates whether a string matches RFC 4122 UUID format (versions 1 through 5, or all).
Signature
ts
Examples
ts
isJSON
Tests if a string is valid JSON syntax without crashing your process on parse failures.
Signature
ts
Examples
ts
Type Guards: isNumber, isString, isObject, isArray
Strict TypeScript runtime guards that narrow unknown values safely.
ts
How is this guide?
Last updated on October 25, 2026