UNPKG

1.06 kBSource Map (JSON)View Raw
1{"version":3,"sources":["iterable/repeatvalue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAU,KAAc,EAAE,QAAgB,CAAC,CAAC;IACrE,OAAO,IAAI,cAAc,CAAU,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;AACvD,CAAC","file":"repeatvalue.js","sourcesContent":["import { of } from './of';\nimport { RepeatIterable } from './operators/repeat';\nimport { IterableX } from './iterablex';\n\n/**\n * Repeats a given value for the specified number of times as an iterable.\n *\n * @export\n * @template TSource The type of element to repeat.\n * @param {TSource} value The value to repeat as an iterable.\n * @param {number} [count=-1] The number of times to repeat the value, infinite if not specified.\n * @returns {AsyncIterableX<TSource>} An iterable with a single item that is repeated over the specified times.\n */\nexport function repeatValue<TSource>(value: TSource, count: number = -1): IterableX<TSource> {\n return new RepeatIterable<TSource>(of(value), count);\n}\n"]}
\No newline at end of file