UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

31 lines (30 loc) 652 B
/** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @since 5.6.0 * @category Lang * @param value The value to check. * @returns Returns `true` if `value` is a plain object, else `false`. * @example * * ```js * function Foo() { * this.a = 1 * } * * isPlainObject(new Foo) * // => false * * isPlainObject([1, 2, 3]) * // => false * * isPlainObject({ 'x': 0, 'y': 0 }) * // => true * * isPlainObject(Object.create(null)) * // => true * ``` */ export declare function isPlainObject(value: any): boolean; export default isPlainObject;