• Produces the set difference of two sequences.

    Example

    const items = [1, 2, 3, 4];
    const exceptItems = from(items).except([2, 4]); // [1, 3]

    Typeparam

    TSource The type of source elements.

    Returns

    A sequence that contains the set difference of the elements of two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • second: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    Returns IEnumerable<TSource>

  • Produces the set difference of two sequences.

    Example

    const items = [1, 2, 3, 4];
    const exceptItems = from(items).except([2, 4]); // [1, 3]

    Typeparam

    TSource The type of source elements.

    Returns

    A sequence that contains the set difference of the elements of two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • Rest ...second: Iterable<TSource>[]

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    Returns IEnumerable<TSource>

  • Produces the set difference of two sequences.

    Example

    const items = [1, 2, 3, 4];
    const exceptItems = from(items).except([2, 4], (a, b) => a === b); // [1, 3]

    Typeparam

    TSource The type of source elements.

    Returns

    A sequence that contains the set difference of the elements of two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • second: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • equalityComparer: EqualityComparer<TSource>

      An EqualityComparer to compare values.

    Returns IEnumerable<TSource>

  • Produces the set difference of two sequences.

    Example

    const items = [1, 2, 3, 4];
    const exceptItems = from(items).except([2, 4], [3], (a, b) => a === b); // [1]

    Typeparam

    TSource The type of source elements.

    Returns

    A sequence that contains the set difference of the elements of two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • second: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • third: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • equalityComparer: EqualityComparer<TSource>

      An EqualityComparer to compare values.

    Returns IEnumerable<TSource>

  • Produces the set difference of two sequences.

    Example

    const items = [1, 2, 3, 4, 5, 6, 7];
    const exceptItems = from(items).except([2, 4], [3, 5], [7], (a, b) => a === b); // [1, 6]

    Typeparam

    TSource The type of source elements.

    Returns

    A sequence that contains the set difference of the elements of two sequences.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      The source iterable.

    • second: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • third: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • fourth: Iterable<TSource>

      An Iterable whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

    • equalityComparer: EqualityComparer<TSource>

      An EqualityComparer to compare values.

    Returns IEnumerable<TSource>

Generated using TypeDoc