How to use the @reactivex/ix-es2015-cjs/asynciterable/pipe/flatmap.flatMap function in @reactivex/ix-es2015-cjs

To help you get started, we’ve selected a few @reactivex/ix-es2015-cjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neo-one-suite / neo-one / packages / neo-one-client-core / src / provider / NEOONEOneDataProvider.ts View on Github external
public iterBlocks(options: IterOptions = {}): AsyncIterable {
    return AsyncIterableX.from(this.getProvider()).pipe(flatMap((provider) => provider.iterBlocks(options)));
  }
github neo-one-suite / neo-one / packages / neo-one-client-core / src / provider / NEOONEDataProvider.ts View on Github external
public iterActionsRaw(options: IterOptions = {}): AsyncIterable {
    return AsyncIterableX.from(this.iterBlocks(options)).pipe(
      flatMap(async (block) => {
        const actions = _.flatten(
          block.transactions.map((transaction) => {
            if (transaction.type === 'InvocationTransaction') {
              return [...transaction.invocationData.actions];
            }

            return [];
          }),
        );

        return AsyncIterableX.of(...actions);
      }),
    );
  }
github neo-one-suite / neo-one / packages / neo-one-client-core / src / provider / NEOONEOneDataProvider.ts View on Github external
public iterActionsRaw(options: IterOptions = {}): AsyncIterable {
    return AsyncIterableX.from(this.getProvider()).pipe(
      flatMap((provider) => provider.iterActionsRaw(options)),
    );
  }