KC's Workspace
    Preparing search index...
    • Creates a Collection.

      The type of Collection created is based on the input.

      • If an Collection, that same Collection.
      • If an Array-like, an Collection.Indexed.
      • If an Object with an Iterator defined, an Collection.Indexed.
      • If an Object, an Collection.Keyed.

      This methods forces the conversion of Objects and Strings to Collections. If you want to ensure that a Collection of one item is returned, use Seq.of.

      Note: An Iterator itself will be treated as an object, becoming a Seq.Keyed, which is usually not what you want. You should turn your Iterator Object into an iterable object by defining a Symbol.iterator (or @@iterator) method which returns this.

      Note: Collection is a conversion function and not a class, and does not use the new keyword during construction.

      Type Parameters

      Parameters

      • collection: I

      Returns I

    • Creates a Collection.

      The type of Collection created is based on the input.

      • If an Collection, that same Collection.
      • If an Array-like, an Collection.Indexed.
      • If an Object with an Iterator defined, an Collection.Indexed.
      • If an Object, an Collection.Keyed.

      This methods forces the conversion of Objects and Strings to Collections. If you want to ensure that a Collection of one item is returned, use Seq.of.

      Note: An Iterator itself will be treated as an object, becoming a Seq.Keyed, which is usually not what you want. You should turn your Iterator Object into an iterable object by defining a Symbol.iterator (or @@iterator) method which returns this.

      Note: Collection is a conversion function and not a class, and does not use the new keyword during construction.

      Type Parameters

      • T

      Parameters

      Returns Indexed<T>

    • Creates a Collection.

      The type of Collection created is based on the input.

      • If an Collection, that same Collection.
      • If an Array-like, an Collection.Indexed.
      • If an Object with an Iterator defined, an Collection.Indexed.
      • If an Object, an Collection.Keyed.

      This methods forces the conversion of Objects and Strings to Collections. If you want to ensure that a Collection of one item is returned, use Seq.of.

      Note: An Iterator itself will be treated as an object, becoming a Seq.Keyed, which is usually not what you want. You should turn your Iterator Object into an iterable object by defining a Symbol.iterator (or @@iterator) method which returns this.

      Note: Collection is a conversion function and not a class, and does not use the new keyword during construction.

      Type Parameters

      • V

      Parameters

      • obj: { [key: string]: V }

      Returns Collection.Keyed<string, V>

    • Creates a Collection.

      The type of Collection created is based on the input.

      • If an Collection, that same Collection.
      • If an Array-like, an Collection.Indexed.
      • If an Object with an Iterator defined, an Collection.Indexed.
      • If an Object, an Collection.Keyed.

      This methods forces the conversion of Objects and Strings to Collections. If you want to ensure that a Collection of one item is returned, use Seq.of.

      Note: An Iterator itself will be treated as an object, becoming a Seq.Keyed, which is usually not what you want. You should turn your Iterator Object into an iterable object by defining a Symbol.iterator (or @@iterator) method which returns this.

      Note: Collection is a conversion function and not a class, and does not use the new keyword during construction.

      Type Parameters

      • K = unknown
      • V = unknown

      Returns Collection<K, V>