Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

filter-scan-dir

jchip702Apache-2.01.5.5TypeScript support: included

Recursively scan and filter directory for a flat array of files

util, recursive, filter, scan, walk, dir, directory, readdir, fs, fast, glob

readme

filter-scan-dir

License build coverage

Downloads

npm badge

Recursively scan and filter directory for a flat array of files.

  • Supports super fast concurrent mode in async version.

  • API Docs

  • Github

Install

npm install --save filter-scan-dir

Usage

import { filterScanDir, filterScanDirSync } from "filter-scan-dir";

// sync
console.log(filterScanDirSync({ cwd: "test" }));

// async
console.log(await filterScanDir({ cwd: "test" }));

License

Licensed under the Apache License, Version 2.0

changelog

v1.5.0

  • add fullStat option to allow enable using the withFileTypes option of readdir for huge performance boost (requires node.js 10.10+) node.js docs.
  • add concurrency option to allow using concurrent mode in async version for massive performance boost.
  • convert to typescript

v1.4.1

  • use fs.lstat instead of fs.stat

v1.4.0

  • process files before directories

v1.3.0

  • sortFiles option
  • support filter callbacks returning result.formatName
  • CI
  • readme badges