forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

is-record.ts10 lines, 442 bytesHistoryRawDownload
1/**
2 * The one record guard for payloads whose shape is only known at runtime —
3 * ZEKA's insight JSON is stored and served unread, so every reader narrows it
4 * field by field. Keep this canonical: a guard redefined per file drifts.
5 */
6export type UnknownRecord = Record<string, unknown>;
7
8export function isRecord(value: unknown): value is UnknownRecord {
9 return typeof value === "object" && value !== null && !Array.isArray(value);
10}