UNPKG

vike

Version:

(Replaces Next.js/Nuxt) 🔨 Composable framework to build advanced applications with flexibility and stability.

17 lines (16 loc) • 422 B
export function isPlainObject(value) { // Is object? if (typeof value !== 'object' || value === null) { return false; } // Support `Object.create(null)` if (Object.getPrototypeOf(value) === null) { return true; } // Is plain object? return ( /* Doesn't work in Cloudflare Pages workers value.constructor === Object */ value.constructor.name === 'Object'); }