• Checks if a Set contains any element

    Example

    Returns true if the Set is empty

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

    Example

    Returns false if the Set contains elements

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

    Returns

    true if the Set is empty, otherwise false

    Parameters

    • set: ReadonlySet<unknown>

      the Set to check

    Returns boolean

Generated using TypeDoc