Sha256: 29ca42d90e6a5ec6aa0e45ecf1d5f421b2b06ce19ee20fcbd61f894f83dd07fa
Contents?: true
Size: 1.12 KB
Versions: 14
Compression:
Stored size: 1.12 KB
Contents
/** * Creates a new object recording the production of the specified value at the given virtual time. * * @constructor * @param {Number} time Virtual time the value was produced on. * @param {Mixed} value Value that was produced. * @param {Function} comparer An optional comparer. */ var Recorded = Rx.Recorded = function (time, value, comparer) { this.time = time; this.value = value; this.comparer = comparer || defaultComparer; }; /** * Checks whether the given recorded object is equal to the current instance. * * @param {Recorded} other Recorded object to check for equality. * @returns {Boolean} true if both objects are equal; false otherwise. */ Recorded.prototype.equals = function (other) { return this.time === other.time && this.comparer(this.value, other.value); }; /** * Returns a string representation of the current Recorded value. * * @returns {String} String representation of the current Recorded value. */ Recorded.prototype.toString = function () { return this.value.toString() + '@' + this.time; };
Version data entries
14 entries across 7 versions & 1 rubygems