rxjs common operators

Icon operation address

Create class operator:

  • from (array),
  • fromEvent(event) 、
  • _of _ (a number of objects) ,
  • interval ,
  • timer (initial delay time, interval time);

Conversion class operator -- _map _ (conversion function) ,

  • _mapTo _ (fixed value) ,
  • pluck (sub-property of the converted object, grandchild property of the converted object),
  • do (the operation function does not interrupt the stream),
  • filter (filter operation),
  • take (take the previous stream of length num) == first ()
  • skip (skip the previous stream of num length)

filter operator --

  • debounce(fn) 、
  • debounceTime (time) All streams within the time period are filtered out, such as input search,
  • distinct () deduplication of the stream, no change does not occur
  • distinctUntilChanged (remove until previous change)

Merge class operator --

  • merge (a,b) cross merge,
  • concat (a,b), the entire paragraph merge
  • startWidth (a), set the stream start value a
  • combineLatest(a,b, (a,b)=>{})、
  • a. withLatestFrom (b), take the latest value of the a stream as the main stream, and return an array
  • zip (aligned merge)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325165846&siteId=291194637