-
Notifications
You must be signed in to change notification settings - Fork 26
Home
This library is a set of features that extends powerful query capabilities to any JavaScript based language. It is a complete implementation of LINQ (Language-Integrated Query) pattern.
The methods in this class provide an implementation of the standard query operators for querying data sources that implement Iterable. The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in JavaScript or any related programming languages (TypeScript, CoffeeScript, etc). Methods that are used in a query that returns a sequence of values do not consume the target data until the query object is enumerated. This is known as deferred execution. Methods that are used in a query that returns a singleton value execute and consume the target data immediately.
Name | Description |
---|---|
[Aggregate] (./aggregate) | Applies an accumulator function over a sequence. |
[All] (./all) | Determines whether all elements of a sequence satisfy a condition. |
[Any] (./any) | Determines whether a sequence contains any elements. |
[AsEnumerable] (./asenumerable) | Returns the input typed as Iterable. |
[Average] (./average) | Computes the average of a sequence of Decimal values. |
[Cast] (./cast) | Casts the elements of an IEnumerable to the specified type. |
[Concat] (./concat) | Concatenates two sequences. |
[Contains] (./contains) | Determines whether a sequence contains a specified element by using the default equality comparer. |
[Count] (./count) | Returns the number of elements in a sequence. |
[DefaultIfEmpty] (./defaultifempty) | Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. |
[Distinct] (./distinct) | Returns distinct elements from a sequence by using the default equality comparer to compare values. |
[ElementAt] (./elementat) | Returns the element at a specified index in a sequence. |
[ElementAtOrDefault] (./elementatordefault) | Returns the element at a specified index in a sequence or a default value if the index is out of range. |
[Except] (./except) | Produces the set difference of two sequences by using the default equality comparer to compare values. |
[First] (./first) | Returns the first element of a sequence. |
[FirstOrDefault] (./firstordefault) | Returns the first element of a sequence, or a default value if the sequence contains no elements. |
[GroupBy] (./groupby) | Groups the elements of a sequence according to a specified key selector function. |
[GroupJoin] (./groupjoin) | Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys. |
[Intersect] (./intersect) | Produces the set intersection of two sequences by using the default equality comparer to compare values. |
[Join] (./join) | Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. |
[Last] (./last) | Returns the last element of a sequence. |
[LastOrDefault] (./lastordefault) | Returns the last element of a sequence, or a default value if the sequence contains no elements. |
[Max] (./max) | Returns the maximum value in a sequence of Decimal values. |
[Min] (./min) | Returns the minimum value in a sequence of Decimal values. |
[OfType] (./oftype) | Filters the elements of an IEnumerable based on a specified type. |
[OrderBy] (./orderby) | Sorts the elements of a sequence in ascending order according to a key. |
[Range] (./range) | Generates a sequence of integral numbers within a specified range. |
[Repeat] (./repeat) | Generates a sequence that contains one repeated value. |
[Reverse] (./reverse) | Inverts the order of the elements in a sequence. |
[Select] (./select) | Projects each element of a sequence into a new form. |
[SelectMany] (./selectmany) | Projects each element of a sequence to an Iterable, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. The index of each source element is used in the intermediate projected form of that element. |
[SequenceEqual] (./sequenceequal) | Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. |
[Single] (./single) | Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. |
[SingleOrDefault] (./singleordefault) | Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. |
[Skip] (./skip) | Bypasses a specified number of elements in a sequence and then returns the remaining elements. |
[SkipWhile] (./skipwhile) | Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. |
[Sum] (./sum) | Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. |
[Take] (./take) | Returns a specified number of contiguous elements from the start of a sequence. |
[TakeWhile] (./takewhile) | Returns elements from a sequence as long as a specified condition is true. |
[ThenBy] (./thenby) | Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. |
[ThenByDescending] (./thenbydescending) | Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. |
[ToArray] (./toarray) | Creates an array from a Iterable. |
[ToMap] (./todictionary) | Creates a Map<TKey, TValue> from an Iterable according to a specified key selector function, a comparer, and an element selector function. |
[Union] (./union) | Produces the set union of two sequences by using a specified IEqualityComparer. |
[Where] (./where) | Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function. |
[Zip] (./zip) | Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |