Skip to content

isNotNullObject

The isNotNullObject function checks if a value is a non-null object.

Syntax

typescript
isNotNullObject(value): boolean

Parameters

NameTypeDescription
valueanyValue to be checked.

Return

TypeDescription
booleanReturns true if the value is an object and not null, otherwise false.

Examples

typescript
isNotNullObject({}); // true
isNotNullObject([]); // true
isNotNullObject(null); // false
isNotNullObject(42); // false

Notes

  • Arrays and functions are also considered objects in JavaScript.
  • Returns false for null, primitive types, and undefined.

References

Released under the MIT License.