Skip to main content
Module

x/cav/serial.ts>isPojo

A server framework for Deno
Go to Latest
function isPojo
import { isPojo } from "https://deno.land/x/cav@0.0.24/serial.ts";

Determines if the object is a plain object or not. This also checks for prototype poisoning; it returns false whenever the prototype of an input object was poisoned before JSON.parsing it. See https://book.hacktricks.xyz/pentesting-web/deserialization/nodejs-proto-prototype-pollution for more information on prototype poisoning.

Parameters

obj: unknown

Returns

obj is Record<string | symbol, unknown>