UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

21 lines (20 loc) 633 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isPlainObject; /** * Checks if value is a plain object, that is, an object created by the * Object constructor or one with a [[Prototype]] of null. * Drop-in replacement for lodash/isPlainObject. */ function isPlainObject(value) { if (value === null || value === undefined || typeof value !== 'object') { return false; } const proto = Object.getPrototypeOf(value); // Object.create(null) if (proto === null) { return true; } // Normal plain objects return proto === Object.prototype; }