• Checks if a Map contains any entry

    Example

    Returns true if the Map is empty

    const result = isEmpty(new Map());
    console.log(result); // true

    Example

    Returns false if the Map contains elements

    const result = isEmpty(new Map([[1, 2]]));
    console.log(result); // false

    Returns

    true if the Map is empty, otherwise false

    Parameters

    • map: ReadonlyMap<unknown, unknown>

      the Map to check

    Returns boolean

Generated using TypeDoc