0.0.11 • Published 4 years ago

rxext v0.0.11

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

RxExt

 // CollectionDateObs
 RX.CollectionDateObs(new Date('2019-01-01'), new Date('2019-01-02'), 86400000/4)
     .subscribe(
         date => console.log(date),
         err => console.log(err),
         _ => console.log('complete')
     );

 // FollowingAsObserverable
RX.Observable.range(0, 100)
    .toArray()
    .selectMany(datas => {
        return RX.FollowingAsObserverable(datas, data => {
            return RX.Observable.range(0, 1).select(_ => data)
        })

    })
    .subscribe(data => {
        // wait and ordering
        console.log(data);
    });

// DecryptRsaKey
RX.Observable.range(0, 1)
    .selectMany(_ => {
        return RX.DecryptRsaKey("encryted data", "key");
    })
    .subscribe(plain => {
        console.log(plain);
    })

// DownloadSheet
RX.Observable.fromArray(Object.keys(CONFIG.sheet))
    .flatMap(key => {
        const config = CONFIG.sheet[key];
        const local = { datas: [] };
        return RX.DownloadSheet(config.url)
            .toArray()
            .map(datas => {
                let ret = {};
                Object.keys(config.idx).forEach(i => {
                    const f = config.idx[i];
                    datas.forEach(data => {
                        ret[i + "_" + f(data)] = data;
                    })
                });

                return ret;
            })
    })
    .toArray()
    .map(items => {
        return Object.assign({}, ...items);
    })
    .subscribe(
        data => console.log(cached),
        err => console.log(err),
        _ => console.log('complete')
    );
0.0.11

4 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago