3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Replace isAdfDocument with readAdfDocument, reading the input once into a plain copy

This commit is contained in:
2026-11-09 07:14:07 +01:00
committed by Lillem4n
parent 899b854d53
commit ca6016b4b6
17 changed files with 332 additions and 134 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export function isJsonValue(value: unknown): value is JsonValue {
}
// Any realm's Object.prototype has a null prototype; serializeCanonicalJson writes a Date or Map as {}.
function isPlainObject(value: unknown): value is object {
export function isPlainObject(value: unknown): value is object {
if (typeof value !== 'object' || value === null) return false
const prototype: unknown = Object.getPrototypeOf(value)
return prototype === null || (typeof prototype === 'object' && Object.getPrototypeOf(prototype) === null)