Function isObject

  • Checks whether a given value is an object, where array's explicitly do not count as objects.

    Since typeof arr === "object" results in true, one usually has to combine that with Array.isArray(arr) to differentiate between an array an actual object. This function just avoid the double check by combining it into one thing.

    Is a function like this really needed? Perhaps not, but here we are.

    Returns

    Returns a boolean indicating whether the value is an actual object

    Parameters

    • value: any

    Returns boolean

Generated using TypeDoc