How to use the @ionic/utils-array.concurrentFilter function in @ionic/utils-array

To help you get started, we’ve selected a few @ionic/utils-array 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 ionic-team / ionic-cli / packages / @ionic / utils-subprocess / src / index.ts View on Github external
return ([] as string[]).concat(...await map(programNames, async (programName): Promise =>
    concurrentFilter(pathParts.map(p => pathlib.join(p, programName)), async p => isExecutableFile(p))));
}
github ionic-team / ionic-cli / packages / ionic / src / commands / doctor / base.ts View on Github external
const ailments = registry.ailments.filter(ailment => {
      if (this.env.config.get(`doctor.issues.${ailment.id}.ignored` as any)) {
        debug('Issue %s ignored by config', ailment.id);
        return false;
      }

      if (!ailment.implicit) {
        debug('Issue %s will not be implicitly detected', ailment.id);
        return false;
      }

      return true;
    });

    const detectedAilments = await concurrentFilter(ailments, async (ailment): Promise => {
      let detected = false;

      try {
        detected = await ailment.detected();
        debug('Detected %s: %s', ailment.id, detected);
      } catch (e) {
        this.env.log.error(
          `Error while checking ${strong(ailment.id)}:\n` +
          `${failure(e.stack ? e.stack : e)}`
        );
      }

      count++;
      detectTask.msg = `Detecting issues: ${strong(`${count} / ${ailments.length}`)} complete`;

      return detected;

@ionic/utils-array

Array utils

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis

Similar packages