UNPKG

@squirrel-forge/ui-util

Version:

A collection of utilities, classes, functions and abstracts made for the browser and babel compatible.

12 lines (11 loc) 303 B
/** * Is a plain object * @param {Object} obj - Object to test * @return {boolean} - True if subject is a plain object */ export function isPojo( obj ) { if ( obj === null || typeof obj !== 'object' ) { return false; } return Object.getPrototypeOf( obj ) === Object.prototype; }