transient nodes

This commit is contained in:
wass08
2026-01-23 11:13:11 +09:00
parent 4f20586ae9
commit 3240266476
5 changed files with 34 additions and 4 deletions
+7
View File
@@ -0,0 +1,7 @@
/**
* Type guard to check if a value is a plain object (and not null or an array).
* Useful for narrowing down Zod's generic JSON types.
*/
export const isObject = (val: unknown): val is Record<string, any> => {
return val !== null && typeof val === 'object' && !Array.isArray(val)
}