UNPKG

iter-tools-es

Version:
17 lines (14 loc) 402 B
const { curry } = require('../../internal/curry.js'); const { wrapWithIterableIterator } = require('../../internal/iterable.js'); function* __repeatTimes(n, value) { while (n--) { yield value; } } exports.__repeatTimes = __repeatTimes; const repeatTimes = /*#__PURE__*/curry( /*#__PURE__*/wrapWithIterableIterator(__repeatTimes), __repeatTimes.length); exports.repeatTimes = repeatTimes;