source: node_modules/es-toolkit/dist/compat/predicate/isPlainObject.d.mts@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 854 bytes
Line 
1/**
2 * Checks if a given value is a plain object.
3 *
4 * A plain object is an object created by the `{}` literal, `new Object()`, or
5 * `Object.create(null)`.
6 *
7 * This function also handles objects with custom
8 * `Symbol.toStringTag` properties.
9 *
10 * `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the
11 * default string description of objects.
12 *
13 * @param {any} [object] - The value to check.
14 * @returns {boolean} - True if the value is a plain object, otherwise false.
15 *
16 * @example
17 * console.log(isPlainObject({})); // true
18 * console.log(isPlainObject([])); // false
19 * console.log(isPlainObject(null)); // false
20 * console.log(isPlainObject(Object.create(null))); // true
21 * console.log(isPlainObject(new Map())); // false
22 */
23declare function isPlainObject(object?: any): boolean;
24
25export { isPlainObject };
Note: See TracBrowser for help on using the repository browser.