repeat
Retorna un Observable que se resuscribe count veces al flujo fuente cuando el Observable fuente se completa
Descripción
Ejemplos
import { repeat } from "rxjs/operators";
import { of } from "rxjs";
const ghibliFilm$ = ajax.getJSON(
"https://ghibliapi.herokuapp.com/films/58611129-2dbc-4a81-a72f-77ddfc1b1b49"
);
ghibliFilm$
.pipe(
map(({ title }) => title),
repeat(3)
)
.subscribe(console.log);
// Output: My Neighbor Totoro, My Neighbor Totoro, My Neighbor TotoroEjemplos de la documentación oficial
Recursos adicionales
Last updated
