Stability: 0 - Deprecated: Use value !== null && typeof value === 'object' instead.

    • object {any}
    • Returns: {boolean}

    Returns true if the given object is strictly an Object and not a Function (even though functions are objects in JavaScript). Otherwise, returns false.

    1. const util = require('util');
    2. util.isObject(5);
    3. // Returns: false
    4. util.isObject(null);
    5. // Returns: false
    6. util.isObject({});
    7. // Returns: true
    8. util.isObject(() => {});
    9. // Returns: false