Connect durable canvas runtime to canonical Foundry protocol
This commit is contained in:
@@ -48,5 +48,5 @@ export function validJson(value: unknown, depth = 0): value is Json {
|
||||
if (value === null || typeof value === 'string' || typeof value === 'boolean') return true;
|
||||
if (typeof value === 'number') return Number.isFinite(value);
|
||||
if (Array.isArray(value)) return value.every(item => validJson(item, depth + 1));
|
||||
return !!value && typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype && Object.entries(value).every(([key, child]) => !['__proto__', 'prototype', 'constructor'].includes(key) && validJson(child, depth + 1));
|
||||
return !!value && typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype && Object.values(value).every(child => validJson(child, depth + 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user