Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
50 lines (38 loc) · 1.86 KB

jortsort.md

File metadata and controls

50 lines (38 loc) · 1.86 KB

Rx.Observable.jortSort()

The jortSort method checks if your inputs are sorted. Note that this is only for a sequence with an end.

See http://jort.technology/ for full details.

Returns

(Observable): An observable which has a single value of true if sorted, else false.

Example

// Sorted
var source = Rx.Observable.of(1,2,3,4)
  .jortSort();

var subscription = source.subscribe(
  function (x) { console.log('Next: %s', x); },
  function (e) { console.log('Error: %s', e); },
  function ( ) { console.log('Completed'); }
);
// => Next: true
// => Completed

// Non sorted
var source = Rx.Observable.of(3,1,2,4)
  .jortSort();

var subscription = source.subscribe(
  function (x) { console.log('Next: %s', x); },
  function (e) { console.log('Error: %s', e); },
  function ( ) { console.log('Completed'); }
);
// => Next: false
// => Completed

Location

File:

Dist:

Prerequisites:

Unit Tests: