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: