Do not use directly - use the static 'from' method
Gets the number of items in the enumerable or throws an error if it needs to be enumerated to get it
the Enumerable instance exposes the same iterator as the wrapped iterable or generator function
Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. (equivalent to Javascript reduce)
aggregate
Determines whether all elements of a sequence satisfy a condition.
true if all
Determines whether any element of a sequence exists or satisfies a condition.
true if any
Appends a value to the end of the sequence
append
Returns itself
enumerable
Computes the average of a sequence of numeric values
average
returns the index of a value in an ordered enumerable or false if not found WARNING: use the same comparer as the one used in the ordered enumerable. The algorithm assumes the enumerable is already sorted.
search
Determines whether the Enumerable can seek (lookup an item by index)
Checks the elements of a sequence based on their type If type is a string, it will check based on typeof, else it will use instanceof. Throws if types are different.
cast
Concatenates two sequences by appending iterable to the existing one
concat
Determines whether a sequence contains a specified element. A custom function can be used to determine equality between elements.
true if contains
Returns the number of items in the Enumerable, even if it has to enumerate all items to do it
count
Not implemented
if empty
Returns distinct elements from a sequence. WARNING: using a comparer makes this slower. Not specifying it uses a Set to determine distinctiveness.
distinct
Returns the distinct values based on a hashing function
by hash
Returns the element at a specified index in a sequence
at
Returns the element at a specified index in a sequence or undefined if the index is out of range.
at or default
Produces the set difference of two sequences WARNING: using the comparer is slower
except
Returns the values that have different hashes from the items of the iterable provided
by hash
Returns the first element of a sequence
first
Returns the first element of a sequence, or undefined if no element is found
or default
Groups the elements of a sequence
by
Correlates the elements of two sequences based on key equality and groups the results. A specified equalityComparer is used to compare keys WARNING: using the equality comparer will be slower
join
Produces the set intersection of two sequences. WARNING: using a comparer is slower
intersect
Returns the values that have the same hashes as items of the iterable provided
by hash
Correlates the elements of two sequences based on matching keys WARNING: using the equality comparer will be slower
join
Joins each item of the enumerable with previous items from the same enumerable
lag
Joins each item of the enumerable with previous items from the same enumerable
lag
Returns the last element of a sequence
last
Returns the last element of a sequence, or undefined if no element is found
or default
Joins each item of the enumerable with next items from the same enumerable
lead
Joins each item of the enumerable with next items from the same enumerable
lead
Same as count
count
Returns the maximum value in a sequence of values. A custom function can be used to establish order (the result 0 means equal, 1 means larger, -1 means smaller)
max
Returns the minimum value in a sequence of values. A custom function can be used to establish order (the result 0 means equal, 1 means larger, -1 means smaller)
min
Filters the elements of a sequence based on their type If type is a string, it will filter based on typeof, else it will use instanceof
type
Sorts the elements of a sequence in ascending order
by
Sorts the elements of a sequence in ascending order
by
Sorts the elements of a sequence in descending order
by descending
Sorts the elements of a sequence in descending order
by descending
Returns an enumerable of at least minLength, padding the end with a value or the result of a function
end
Returns an enumerable of at least minLength, padding the start with a value or the result of a function if the enumerable cannot seek, then it will be iterated minLength time
start
Adds a value to the beginning of the sequence.
prepend
Implements random reservoir sampling of k items, with the option to specify a maximum limit for the items
sample
Inverts the order of the elements in a sequence
reverse
Projects each element of a sequence into a new form (equivalent to Javascript map)
select
Projects each element of a sequence to an iterable and flattens the resulting sequences into one sequence
many
Determines whether two sequences are equal and in the same order according to an equality comparer
true if equal
Returns a randomized sequence of items from an initial source
shuffle
Returns the single element of a sequence and throws if it doesn't have exactly one
single
Returns the single element of a sequence or undefined if none found. It throws if the sequence contains multiple items
or default
Bypasses a specified number of elements in a sequence and then returns an Enumerable of the remaining elements
skip
Returns a new enumerable collection that contains the elements from source with the last nr elements of the source collection omitted
last
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
while
Selects the elements starting at the given start argument, and ends at, but does not include, the given end argument
slice
Takes start elements, ignores howmany elements, continues with the new items and continues with the original enumerable Equivalent to the value of an array after performing splice on it with the same parameters
splice
Computes the sum of a sequence of numeric values
sum
Computes the sum and count of a sequence of numeric values
and count
Returns a specified number of contiguous elements from the start of a sequence
take
Returns a new enumerable collection that contains the last nr elements from source
last
Returns elements from a sequence as long as a specified condition is true, and then skips the remaining elements
while
Creates an array from an Enumerable
array
Not implemented (use toMap)
dictionary
Not implemented (use toSet)
hash set
Similar to toArray, but returns a seekable Enumerable (itself if already seekable) that can do count and elementAt without iterating
list
Not implemented (use groupBy)
lookup
Creates a map from an Enumerable based on a key function and a value function
map
Creates a map from an Enumerable based on a key function and the value from the Enumerable
map
Creates a set from an enumerable
set
Produces the set union of two sequences
union
use the default browser sort implementation for ordering at all times
browser sort
use QuickSort for ordering (default). Recommended when take, skip, takeLast, skipLast are used after orderBy
quick sort
Filters a sequence of values based on a predicate (equivalent to Javascript filter)
where
Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
zip
Takes the corresponding elements of two sequences, producing a sequence of tuples of elements.
zip
returns an empty Enumerable
empty
wraps an iterable item into an Enumerable if it's not already one
from
generates a sequence of integer numbers within a specified range.
range
generates a sequence that contains one repeated value
repeat
Sorts an array in place using Quicksort
sort
Generated using TypeDoc
wrapper class over iterable instances that exposes the methods usually found in .NET LINQ