Sha256: 8035b3ede67136e1bd9e3f603fabba704353bcccb2c03a4a007a469f4dbd008e
Contents?: true
Size: 888 Bytes
Versions: 14
Compression:
Stored size: 888 Bytes
Contents
/** * Returns the first 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 {Any} [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 first element in the observable sequence that satisfies the condition in the predicate, or a default value if no such element exists. */ observableProto.firstOrDefault = function (predicate, defaultValue, thisArg) { return predicate ? this.where(predicate).firstOrDefault(null, defaultValue) : firstOrDefaultAsync(this, true, defaultValue); };
Version data entries
14 entries across 7 versions & 1 rubygems