Is Object
Checks if the provided parameter is a plain object.
| Category | Validations |
| Author | Pol Gubau |
| Since | 1.0.0 |
| Last Updated | 2025-03-15 |
| Type | Sync |
| Compatibility | Universal |
Example
Input
isObject({})Output:
true
Input
isObject(`string`)Output:
false
Return
Returns true if the item is a plain object, otherwise false.
Type: boolean
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| item | unknown | null | Yes | The item to check. |
Notes
A plain object is one that is created using the `Object` constructor, not an instance of a class.
Tags
- object
- type checking
Related
- arrays
- universal
- sync
- Since 1.0.0
- objects
- universal
- sync
- Since 1.0.0
- objects
- universal
- sync
- Since 1.0.0
groupBy
Groups the elements of an array based on a provided key-generating function.
cloneDeep
Deep clone an object. A deep clone is a clone of the source object and all of its children, and their children, and so on.
getMainField
Retrieves the main field from an item object based on a predefined list of labels to highlight.