How to use the pairs function from rxjs

Find comprehensive JavaScript rxjs.pairs code examples handpicked from public code repositorys.

57
58
59
60
61
62
63
64
65
66
exports.interval = rxjs.interval;
exports.merge = rxjs.merge;
exports.never = rxjs.never;
exports.of = rxjs.of;
exports.onErrorResumeNext = rxjs.onErrorResumeNext;
exports.pairs = rxjs.pairs;
exports.partition = rxjs.partition;
exports.race = rxjs.race;
exports.range = rxjs.range;
exports.throwError = rxjs.throwError;
fork icon299
star icon0
watch icon1

15
16
17
18
19
20
21
22
23
24
25
const getAllUsers = ({ getUsers }) => ({ params }) => {
  return from(getUsers());
};


const getUserRoles = () => () =>
  pairs(require("../../config/user-roles")).pipe(
    map((arr) => Array.from(new Set(arr))),
    reduce((acc, curr) => acc.concat(curr))
  );

fork icon0
star icon0
watch icon0