1. fdir
The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s
fdir
Package: fdir
Created by: thecodrr
Last modified: Sun, 05 Nov 2023 17:26:07 GMT
Version: 6.1.1
License: MIT
Downloads: 2,010,115
Repository: https://github.com/thecodrr/fdir

Install

npm install fdir
yarn add fdir

The Fastest Directory Crawler & Globber for NodeJS

The Fastest: Nothing similar (in the NodeJS world) beats fdir in speed. It can easily crawl a directory containing 1 million files in < 1 second.

💡 Stupidly Easy: fdir uses expressive Builder pattern to build the crawler increasing code readability.

🤖 Zero Dependencies*: fdir only uses NodeJS fs & path modules.

🕺 Astonishingly Small: < 2KB in size gzipped & minified.

🖮 Hackable: Extending fdir is extremely simple now that the new Builder API is here. Feel free to experiment around.

* picomatch must be installed manually by the user to support globbing.

Support

Do you like this project? Support me by donating, creating an issue, becoming a stargazer, or opening a pull request. Thanks.

🚄 Quickstart

Installation

You can install using npm:

 $ npm i fdir

or Yarn:

 $ yarn add fdir

Usage

 import { fdir } from "fdir";

// create the builder
const api = new fdir().withFullPaths().crawl("path/to/dir");

// get all files in a directory synchronously
const files = api.sync();

// or asynchronously
api.withPromise().then((files) => {
  // do something with the result here.
});

Documentation:

Documentation for all methods is available here.

📊 Benchmarks:

Please check the benchmark against the latest version here.

🙏Used by:

fdir is downloaded over 100k+ times a week by projects around the world. Here's a list of some notable projects using fdir in production:

Note: if you think your project should be here, feel free to open an issue. Notable is anything with a considerable amount of GitHub stars.

  1. mdn/yari
  2. streetwriters/notesnook
  3. zhangdaren/miniprogram-to-uniapp
  4. imba/imba
  5. moroshko/react-scanner
  6. netlify/build
  7. FredKSchott/snowpack*
  8. yassinedoghri/astro-i18next
  9. immich-app/CLI
  10. selfrefactor/rambda
  • snowpack has since been discontinued.

🦮 LICENSE

Copyright © 2023 Abdullah Atta under MIT. Read full text here.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin