Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function getArticleVector(action$, state$) {
  3.     return action$.pipe(
  4.         ofType(actions.setArticle.type),
  5.         switchMap(({ payload }) => {
  6.             if (!payload) {
  7.                 return EMPTY;
  8.             }
  9.             return api.analyzeArticle(payload)
  10.                 .pipe(
  11.                     map(data => actions.setArticleVector(data.response.vector)),
  12.                 );
  13.         }),
  14.         setError(),
  15.     );
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement