How to use node-filter-async - 1 common examples

To help you get started, we’ve selected a few node-filter-async 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 OmniSharp / omnisharp-vscode / src / packageManager / PackageFilterer.ts View on Github external
async function filterAlreadyInstalledPackages(packages: AbsolutePathPackage[]): Promise {
    return filterAsync(packages, async (pkg: AbsolutePathPackage) => {
        //If the file is present at the install test path then filter it
        let testPath = pkg.installTestPath;
        if (!testPath) {
            //if there is no testPath specified then we will not filter it
            return true;
        }

        return !(await util.fileExists(testPath.value));
      });
}

node-filter-async

Filter array elements with Promises

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular node-filter-async functions