ix
Version:
The Interactive Extensions for JavaScript
20 lines (18 loc) • 801 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.repeatValue = void 0;
const of_js_1 = require("./of.js");
const repeat_js_1 = require("./operators/repeat.js");
/**
* Repeats a given value for the specified number of times as an iterable.
*
* @template TSource The type of element to repeat.
* @param {TSource} value The value to repeat as an iterable.
* @param {number} [count=-1] The number of times to repeat the value, infinite if not specified.
* @returns {AsyncIterableX<TSource>} An iterable with a single item that is repeated over the specified times.
*/
function repeatValue(value, count = -1) {
return new repeat_js_1.RepeatIterable((0, of_js_1.of)(value), count);
}
exports.repeatValue = repeatValue;
//# sourceMappingURL=repeatvalue.js.map