fromfrom
Introduction
API documentation
Playground
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Ordered
Sequence
Impl
Sequence
Impl
constructor
__@iterator
concat
distinct
every
filter
find
first
flat
Map
for
Each
group
By
includes
is
Empty
last
map
pick
prepend
reduce
reverse
skip
skip
While
some
sort
By
sort
ByDescending
sum
take
take
While
to
Array
to
Map
to
Object
to
Set
to
String
without
Grouping
Number
Keyed
Object
Ordered
Sequence
Sequence
String
Keyed
Object
Callback
Fn
Compare
Predicate
Comparer
Fn
Iterator
Creator
Fn
Key
Selector
Fn
Map
Fn
Predicate
Fn
Reduce
Callback
Fn
copy
Into
AnArray
from
iterable
From
Generator
A sequence of items
Type parameters
TItem
Hierarchy
SequenceImpl
OrderedSequenceImpl
Implements
Iterable
<
TItem
>
Sequence
<
TItem
>
Index
Constructors
constructor
Methods
__@iterator
concat
distinct
every
filter
find
first
flat
Map
for
Each
group
By
includes
is
Empty
last
map
pick
prepend
reduce
reverse
skip
skip
While
some
sort
By
sort
ByDescending
sum
take
take
While
to
Array
to
Map
to
Object
to
Set
to
String
without
Constructors
constructor
new
Sequence
Impl
(
_iterable
:
Iterable
<
TItem
>
)
:
SequenceImpl
Parameters
_iterable:
Iterable
<
TItem
>
Returns
SequenceImpl
Methods
__@iterator
__@iterator
(
)
:
Iterator
<
TItem
>
Returns
Iterator
<
TItem
>
concat
concat<TOther>
(
...
others
:
Iterable
<
TOther
>
[]
)
:
Sequence
<
TItem
|
TOther
>
Type parameters
TOther
Parameters
Rest
...
others:
Iterable
<
TOther
>
[]
Returns
Sequence
<
TItem
|
TOther
>
distinct
distinct
(
)
:
Sequence
<
TItem
>
Returns
Sequence
<
TItem
>
every
every
(
predicate
?:
PredicateFn
<
TItem
>
)
:
boolean
Parameters
Default value
predicate:
PredicateFn
<
TItem
>
= identityPredicateFn
Returns
boolean
filter
filter
(
predicate
:
PredicateFn
<
TItem
>
)
:
Sequence
<
TItem
>
Parameters
predicate:
PredicateFn
<
TItem
>
Returns
Sequence
<
TItem
>
find
find
(
predicate
:
PredicateFn
<
TItem
>
)
:
TItem
|
undefined
Parameters
predicate:
PredicateFn
<
TItem
>
Returns
TItem
|
undefined
first
first
(
)
:
TItem
|
undefined
Returns
TItem
|
undefined
flat
Map
flat
Map<TResultItem>
(
mapperFn
:
MapFn
<
TItem
,
TResultItem
[]
>
)
:
Sequence
<
TResultItem
>
Type parameters
TResultItem
Parameters
mapperFn:
MapFn
<
TItem
,
TResultItem
[]
>
Returns
Sequence
<
TResultItem
>
for
Each
for
Each
(
callback
:
CallbackFn
<
TItem
>
)
:
void
Parameters
callback:
CallbackFn
<
TItem
>
Returns
void
group
By
group
By<TKey>
(
key
:
TKey
)
:
Sequence
<
Grouping
<
TItem[TKey]
,
TItem
>
>
group
By<TKey>
(
keySelector
:
KeySelectorFn
<
TItem
,
TKey
>
)
:
Sequence
<
Grouping
<
TKey
,
TItem
>
>
group
By<TKey, TElement>
(
key
:
TKey
, elementSelector
:
MapFn
<
TItem
,
TElement
>
)
:
Sequence
<
Grouping
<
TItem[TKey]
,
TItem
>
>
group
By<TKey, TElement>
(
keySelector
:
KeySelectorFn
<
TItem
,
TKey
>
, elementSelector
:
MapFn
<
TItem
,
TElement
>
)
:
Sequence
<
Grouping
<
TKey
,
TElement
>
>
Type parameters
TKey
:
keyof TItem
Parameters
key:
TKey
Returns
Sequence
<
Grouping
<
TItem[TKey]
,
TItem
>
>
Type parameters
TKey
Parameters
keySelector:
KeySelectorFn
<
TItem
,
TKey
>
Returns
Sequence
<
Grouping
<
TKey
,
TItem
>
>
Type parameters
TKey
:
keyof TItem
TElement
Parameters
key:
TKey
elementSelector:
MapFn
<
TItem
,
TElement
>
Returns
Sequence
<
Grouping
<
TItem[TKey]
,
TItem
>
>
Type parameters
TKey
TElement
Parameters
keySelector:
KeySelectorFn
<
TItem
,
TKey
>
elementSelector:
MapFn
<
TItem
,
TElement
>
Returns
Sequence
<
Grouping
<
TKey
,
TElement
>
>
includes
includes
(
searchItem
:
TItem
)
:
boolean
Parameters
searchItem:
TItem
Returns
boolean
is
Empty
is
Empty
(
)
:
boolean
Returns
boolean
last
last
(
)
:
TItem
|
undefined
Returns
TItem
|
undefined
map
map<TResultItem>
(
mapFn
:
MapFn
<
TItem
,
TResultItem
>
)
:
Sequence
<
TResultItem
>
Type parameters
TResultItem
Parameters
mapFn:
MapFn
<
TItem
,
TResultItem
>
Returns
Sequence
<
TResultItem
>
pick
pick<TKeys>
(
...
keys
:
TKeys
[]
)
:
Sequence
<
object
>
Type parameters
TKeys
:
keyof TItem
Parameters
Rest
...
keys:
TKeys
[]
Returns
Sequence
<
object
>
prepend
prepend
(
...
items
:
Iterable
<
TItem
>
[]
)
:
Sequence
<
TItem
>
Parameters
Rest
...
items:
Iterable
<
TItem
>
[]
Returns
Sequence
<
TItem
>
reduce
reduce<TResult>
(
callback
:
ReduceCallbackFn
<
TResult
,
TItem
>
, accumulator
:
TResult
)
:
TResult
Type parameters
TResult
Parameters
callback:
ReduceCallbackFn
<
TResult
,
TItem
>
accumulator:
TResult
Returns
TResult
reverse
reverse
(
)
:
Sequence
<
TItem
>
Returns
Sequence
<
TItem
>
skip
skip
(
howMany
:
number
)
:
Sequence
<
TItem
>
Parameters
howMany:
number
Returns
Sequence
<
TItem
>
skip
While
skip
While
(
predicate
:
PredicateFn
<
TItem
>
)
:
Sequence
<
TItem
>
Parameters
predicate:
PredicateFn
<
TItem
>
Returns
Sequence
<
TItem
>
some
some
(
predicate
?:
PredicateFn
<
TItem
>
)
:
boolean
Parameters
Default value
predicate:
PredicateFn
<
TItem
>
= identityPredicateFn
Returns
boolean
sort
By
sort
By
(
)
:
OrderedSequence
<
TItem
>
sort
By<TKey>
(
keySelector
:
KeySelectorFn
<
TItem
,
TKey
>
, comparer
?:
ComparerFn
<
TKey
>
)
:
OrderedSequence
<
TItem
>
Returns
OrderedSequence
<
TItem
>
Type parameters
TKey
Parameters
keySelector:
KeySelectorFn
<
TItem
,
TKey
>
Optional
comparer:
ComparerFn
<
TKey
>
Returns
OrderedSequence
<
TItem
>
sort
ByDescending
sort
ByDescending<TKey>
(
keySelector
?:
KeySelectorFn
<
TItem
,
TKey
>
, comparer
?:
ComparerFn
<
TKey
>
)
:
OrderedSequence
<
TItem
>
Type parameters
TKey
Parameters
Optional
keySelector:
KeySelectorFn
<
TItem
,
TKey
>
Optional
comparer:
ComparerFn
<
TKey
>
Returns
OrderedSequence
<
TItem
>
sum
sum<TItem>
(
)
:
number
sum<TItem>
(
)
:
string
sum<TResult>
(
valueSelector
:
MapFn
<
TItem
,
TResult
>
)
:
number
sum<TResult>
(
valueSelector
:
MapFn
<
TItem
,
TResult
>
)
:
string
Type parameters
TItem
:
number
Returns
number
Type parameters
TItem
:
string
Returns
string
Type parameters
TResult
:
number
Parameters
valueSelector:
MapFn
<
TItem
,
TResult
>
Returns
number
Type parameters
TResult
:
string
Parameters
valueSelector:
MapFn
<
TItem
,
TResult
>
Returns
string
take
take
(
howMany
:
number
)
:
Sequence
<
TItem
>
Parameters
howMany:
number
Returns
Sequence
<
TItem
>
take
While
take
While
(
predicate
:
PredicateFn
<
TItem
>
)
:
SequenceImpl
<
TItem
>
Parameters
predicate:
PredicateFn
<
TItem
>
Returns
SequenceImpl
<
TItem
>
to
Array
to
Array
(
)
:
TItem
[]
Returns
TItem
[]
to
Map
to
Map<TKey, TElement>
(
keySelectorFn
:
MapFn
<
TItem
,
TKey
>
, elementSelectorFn
?:
MapFn
<
TItem
,
TElement
>
)
:
Map
<
TKey
,
TElement
>
Type parameters
TKey
TElement
Parameters
keySelectorFn:
MapFn
<
TItem
,
TKey
>
Optional
elementSelectorFn:
MapFn
<
TItem
,
TElement
>
Returns
Map
<
TKey
,
TElement
>
to
Object
to
Object
(
keySelectorFn
:
MapFn
<
TItem
,
string
>
)
:
StringKeyedObject
<
TItem
>
to
Object
(
keySelectorFn
:
MapFn
<
TItem
,
number
>
)
:
NumberKeyedObject
<
TItem
>
to
Object<TElement>
(
keySelectorFn
:
MapFn
<
TItem
,
string
>
, elementSelectorFn
:
MapFn
<
TItem
,
TElement
>
)
:
StringKeyedObject
<
TElement
>
to
Object<TElement>
(
keySelectorFn
:
MapFn
<
TItem
,
number
>
, elementSelectorFn
:
MapFn
<
TItem
,
TElement
>
)
:
NumberKeyedObject
<
TElement
>
Parameters
keySelectorFn:
MapFn
<
TItem
,
string
>
Returns
StringKeyedObject
<
TItem
>
Parameters
keySelectorFn:
MapFn
<
TItem
,
number
>
Returns
NumberKeyedObject
<
TItem
>
Type parameters
TElement
Parameters
keySelectorFn:
MapFn
<
TItem
,
string
>
elementSelectorFn:
MapFn
<
TItem
,
TElement
>
Returns
StringKeyedObject
<
TElement
>
Type parameters
TElement
Parameters
keySelectorFn:
MapFn
<
TItem
,
number
>
elementSelectorFn:
MapFn
<
TItem
,
TElement
>
Returns
NumberKeyedObject
<
TElement
>
to
Set
to
Set
(
)
:
Set
<
TItem
>
Returns
Set
<
TItem
>
to
String
to
String
(
separator
?:
string
)
:
string
Parameters
Default value
separator:
string
= ","
Returns
string
without
without
(
items
:
Iterable
<
TItem
>
, predicate
?:
ComparePredicate
<
TItem
>
)
:
Sequence
<
TItem
>
Parameters
items:
Iterable
<
TItem
>
Optional
predicate:
ComparePredicate
<
TItem
>
Returns
Sequence
<
TItem
>
Generated using
TypeDoc
A sequence of items