Sha256: c2a4b1eac2aa4ce73c3118c3c60b8df214954ffbe660b28199f45adb4729d921
Contents?: true
Size: 886 Bytes
Versions: 14
Compression:
Stored size: 886 Bytes
Contents
/** * Returns the last element of an observable sequence that satisfies the condition in the predicate, or a default value if no such element exists. * @param {Function} [predicate] A predicate function to evaluate for elements in the source sequence. * @param [defaultValue] The default value if no such element exists. If not specified, defaults to null. * @param {Any} [thisArg] Object to use as `this` when executing the predicate. * @returns {Observable} Sequence containing the last element in the observable sequence that satisfies the condition in the predicate, or a default value if no such element exists. */ observableProto.lastOrDefault = function (predicate, defaultValue, thisArg) { return predicate ? this.where(predicate, thisArg).lastOrDefault(null, defaultValue) : lastOrDefaultAsync(this, true, defaultValue); };
Version data entries
14 entries across 7 versions & 1 rubygems