• Returns whether the given object is null or undefined

    Parameters

    • object: any

      the object to check

    Returns boolean

    whether the given object is null or undefined

    isNil(null);    // true
    isNil(undefined); // true
    isNil({}); // false