Sha256: 8343cc79e10a2c8a1ab91bad099b4ad1eba9d48238a927186ba143ef114f939a
Contents?: true
Size: 752 Bytes
Versions: 14
Compression:
Stored size: 752 Bytes
Contents
/** * Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence. * @param {Function} [predicate] A predicate function to evaluate for elements in the source sequence. * @param {Any} [thisArg] Object to use as `this` when executing the predicate. * @returns {Observable} Sequence containing the single element in the observable sequence that satisfies the condition in the predicate. */ observableProto.single = function (predicate, thisArg) { return predicate && isFunction(predicate) ? this.where(predicate, thisArg).single() : singleOrDefaultAsync(this, false); };
Version data entries
14 entries across 7 versions & 1 rubygems