How to use the bindCallback function from rxjs

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

40
41
42
43
44
45
46
47
48
49
exports.ArgumentOutOfRangeError = rxjs.ArgumentOutOfRangeError;
exports.EmptyError = rxjs.EmptyError;
exports.ObjectUnsubscribedError = rxjs.ObjectUnsubscribedError;
exports.UnsubscriptionError = rxjs.UnsubscriptionError;
exports.TimeoutError = rxjs.TimeoutError;
exports.bindCallback = rxjs.bindCallback;
exports.bindNodeCallback = rxjs.bindNodeCallback;
exports.combineLatest = rxjs.combineLatest;
exports.concat = rxjs.concat;
exports.defer = rxjs.defer;
fork icon299
star icon0
watch icon1

28
29
30
31
32
33
34
35
36
37
                flicClient,
                'close',
        )
),
switchMap(() => (
        bindCallback(
                flicClient
                .getInfo
                .bind(flicClient)
        )()
fork icon2
star icon6
watch icon2

+ 3 other calls in file

4
5
6
7
8
9
10
11
12
13
function obs_stat(tag) {
    return Observable.bindCallback(fs.stat, (err, stat) => [err, stat, tag])
}

function obs_readdir(tag) {
    return Observable.bindCallback(fs.readdir, (err, files) => [err, files, tag]);
}

function obs_readFile(tag) {
    return Observable.bindCallback(fs.readFile, (err, data) => [err, data, tag]);
fork icon2
star icon2
watch icon3

+ 7 other calls in file

40
41
42
43
44
45
46
47
48
49
request: {
  perform: (method, url, opts) =>
    source =>
      source.pipe(
        map(options => Object.assign({ json: true }, options, opts, { method, url})),
        flatMap(options => bindCallback(request)(options)),
        flatMap(response =>
          !Array.isArray(response) ? throwError(response) :
            response[1].statusCode > 399 ?
              throwError({
fork icon0
star icon2
watch icon3