UNPKG
geninq
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
A JavaScript version of the Linq library for Generators
github.com/PaulPopat/geninq
PaulPopat/geninq
geninq
/
src
/
functions
/
repeat.ts
6 lines
(5 loc)
•
111 B
text/typescript
View Raw
1
2
3
4
5
6
export
function
*
Repeat
<T>(
item
: T,
count
:
number
) {
for
(
let
i =
0
; i < count; i++) {
yield
item; } }