TypeScript Tested
Safely narrow unknown JSON with type guards
Replace "as any" on parsed JSON with small type guards that check shape at runtime.
Loading snippets…
14 snippets
Replace "as any" on parsed JSON with small type guards that check shape at runtime.
Store passwords with password_hash and check them with password_verify, including rehash on login.