Skip to content
Eugene Sadovoi edited this page Jul 7, 2016 · 14 revisions

This library is a continuous effort to implement LINQ using latest features of TypeScript and JavaScript languages (For ES5 compatible library look at linq-es5 branch). The library is implemented in TypeScript and transpiled into JavaScript. It is distributed as a native node module. Browserified and minified standalone UMD modules are located in ./dist directory and could be used directly in compatible browsers. This library uses latest ECMAScript 2015 language specification and utilizes Iterables ([System.iterator]), JavaScript generators (function* ...), and for of loops. All relevant methods are implemented with deferred execution so no unnecessary iterations are performed. The code is backwards compatible with linq-es5 and C# implementations.

Implemented methods

Name Description
[Aggregate] (./aggregate) Applies an accumulator function over a sequence.
[All] (./all.md) Determines whether all elements of a sequence satisfy a condition.
[Any] (./any.md) Determines whether a sequence contains any elements.
[AsEnumerable] (./asenumerable.md) Returns the input typed as Iterable.
[Average] (./average.md) Computes the average of a sequence of Decimal values.
[Cast] (./cast.md) Casts the elements of an IEnumerable to the specified type.
[Concat] (./concat.md) Concatenates two sequences.
[Contains] (./contains.md) Determines whether a sequence contains a specified element by using the default equality comparer.
[Count] (./count.md) Returns the number of elements in a sequence.
[DefaultIfEmpty] (./defaultifempty.md) 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.md) Returns distinct elements from a sequence by using the default equality comparer to compare values.
[ElementAt] (./elementat.md) Returns the element at a specified index in a sequence.
[ElementAtOrDefault] (./elementatordefault.md) Returns the element at a specified index in a sequence or a default value if the index is out of range.
[Except] (./except.md) Produces the set difference of two sequences by using the default equality comparer to compare values.
[First] (./first.md) Returns the first element of a sequence.
[FirstOrDefault] (./firstordefault.md) Returns the first element of a sequence, or a default value if the sequence contains no elements.
[GroupBy] (./groupby.md) Groups the elements of a sequence according to a specified key selector function.
[GroupJoin] (./groupjoin.md) 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.md) Produces the set intersection of two sequences by using the default equality comparer to compare values.
[Join] (./join.md) Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.
[Last] (./last.md) Returns the last element of a sequence.
[LastOrDefault] (./lastordefault.md) Returns the last element of a sequence, or a default value if the sequence contains no elements.
[Max] (./max.md) Returns the maximum value in a sequence of Decimal values.
[Min] (./min.md) Returns the minimum value in a sequence of Decimal values.
[OfType] (./oftype.md) Filters the elements of an IEnumerable based on a specified type.
[OrderBy] (./orderby.md) Sorts the elements of a sequence in ascending order according to a key.
[Range] (./range.md) Generates a sequence of integral numbers within a specified range.
[Repeat] (./repeat.md) Generates a sequence that contains one repeated value.
[Reverse] (./reverse.md) Inverts the order of the elements in a sequence.
[Select] (./select.md) Projects each element of a sequence into a new form.
[SelectMany] (./selectmany.md) 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.md) Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type.
[Single] (./single.md) 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.md) 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.md) Bypasses a specified number of elements in a sequence and then returns the remaining elements.
[SkipWhile] (./skipwhile.md) Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.
[Sum] (./sum.md) 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.md) Returns a specified number of contiguous elements from the start of a sequence.
[TakeWhile] (./takewhile.md) Returns elements from a sequence as long as a specified condition is true.
[ThenBy] (./thenby.md) Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer.
[ThenByDescending] (./thenbydescending.md) Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.
[ToArray] (./toarray.md) Creates an array from a Iterable.
[ToMap] (./todictionary.md) Creates a Map<TKey, TValue> from an Iterable according to a specified key selector function, a comparer, and an element selector function.
[Union] (./union.md) Produces the set union of two sequences by using a specified IEqualityComparer.
[Where] (./where.md) Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
[Zip] (./zip.md) Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.
Clone this wiki locally