ts-iterable-functions
    Preparing search index...

    Function _isSubsetOf

    • Determines whether every element of the source iterable exists in the comparison sequence.

      Type Parameters

      • T

        Element type produced by both iterables.

      Parameters

      • src: Iterable<T>

        Source iterable whose membership is being tested.

      • seq: Iterable<T>

        Iterable that must contain all values from src.

      • setFactory: SetFactory<T> = ...

        Optional factory supplying the set used for membership checks.

      Returns boolean

      true when src is a subset of seq, otherwise false.

      Error Rethrows any error thrown by setFactory.

      const result = _isSubsetOf([1, 2], [1, 2, 3]);
      console.log(result); // true

      or using the curried version:

      const result = pipeInto(
      [1, 2],
      isSubsetOf([1, 2, 3])
      );
      console.log(result); // true