Jump to Content
nativescript-enumerableDiscussions
API ReferenceDiscussions
v3.5.1

Discussionsnativescript-enumerable
API Reference
v3.5.1API ReferenceDiscussions

Documentation

  • Getting Started
  • Functions and lambdas
  • What are "sequences"?

Functions

  • asFunc
  • asEnumerable
  • create
  • each
  • fromArray
  • fromObject
  • range
  • repeat
  • sort
  • sortDesc
  • toComparerSafe
  • toEqualityComparerSafe
  • toPredicateSafe

Methods

  • aggregate
  • all
  • any
  • average
  • cast
  • concat
  • contains
  • count
  • defaultIfEmpty
  • distinct
  • each
  • elementAt
  • elementAtOrDefault
  • except
  • first
  • firstOrDefault
  • groupBy
  • groupJoin
  • intersect
  • join
  • last
  • lastOrDefault
  • max
  • min
  • ofType
  • order
  • orderBy
  • orderByDescending
  • orderDescending
  • pushToArray
  • reverse
  • select
  • selectMany
  • sequenceEqual
  • single
  • singleOrDefault
  • skip
  • skipLast
  • skipWhile
  • sum
  • take
  • takeWhile
  • toArray
  • then
  • thenBy
  • thenByDescending
  • thenDescending
  • toObject
  • toObservable
  • toObservableArray
  • toLookup
  • union
  • where
  • zip
Powered by 

sort

Short hand version for 'order(By)' methods of a sequence.

// 1, 2, 3
Enumerable.sort([2, 1, 3]);

// 33, 22, 11
Enumerable.sort([22, 11, 33],
                (x, y) => y - x);

With selector

// 22, 11, 3.3
Enumerable.sort([11, 22, 3.3],
                (x, y) => y - x',
                x => x * 10);