RxJS. Delay from array
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log); Stackblitz (in console):
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log); Stackblitz (in console):
Основы библиотеки RxJS с примерами + полезные ссылки по RxJS
Живой поиск по ячейкам таблицы на Javascript
Следует пройтись map'ом по массиву и если id совпадёт, то вернуть заменяемый объект.
Clean Code concepts adapted for TypeScript. Inspired from clean-code-javascript