Sha256: f019b2fb7b39bad38c0639c4656b8bb984484eb066326cb2190603760adc39af
Contents?: true
Size: 737 Bytes
Versions: 14
Compression:
Stored size: 737 Bytes
Contents
/** * jortSort checks if your inputs are sorted until another Observable sequence fires. * See http://jort.technology/ for full details. * @returns {Observable} An observable which has a single value of true if sorted, else false. */ observableProto.jortSortUntil = function (other) { var source = this; return new AnonymousObservable(function (observer) { var arr = []; return source.takeUntil(other).subscribe( arr.push.bind(arr), observer.onError.bind(observer), function () { var sorted = arr.slice(0).sort(defaultSubComparer); observer.onNext(isEqual(arr, sorted)); observer.onCompleted(); }); }, source); };
Version data entries
14 entries across 7 versions & 1 rubygems