• Stars
    star
    1,259
  • Rank 37,354 (Top 0.8 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โšก The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s

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.

More Repositories

1

BreadPlayer

Bread Player, a free and open source music player powered by UWP and C#/.NET with a sleek and polished design built for, and by, the people seeking a better alternative to Groove and Windows Media Player by Microsoft.
C#
298
star
2

alfaaz

The fastest multilingual word counter that can count millions of words per second.
TypeScript
180
star
3

boxx

๐Ÿ“ฆ Create highly customizable terminal boxes that also look great!
V
96
star
4

crayon

๐Ÿ–๏ธ Paint your terminal output like Picasso ๐ŸŽจ
V
54
star
5

vspeech

๐Ÿ“ข Complete V bindings for Mozilla's DeepSpeech TensorFlow based Speech-to-Text library. ๐Ÿ“œ
V
48
star
6

vave

๐ŸŒŠ A crazy simple library for reading/writing WAV files in V. Zero dependencies, 100% cross-platform.
V
36
star
7

EReader

A simple ebook reader for UWP
C#
16
star
8

codeblock.css

263 bytes of CSS to make HTML code blocks pretty again. Much like Prism.js but without any highlighting.
CSS
16
star
9

vws

WebSockets library for V (WIP)
V
13
star
10

docgen

Static on-the-fly documentation generator written in Rust to generate fancy looking docs blazing fast!
Rust
11
star
11

WhatIfJS

WhatIf is an extremely simple and easy to use JavaScript extension for expressing a single if-else statement anywhere, anytime.
JavaScript
9
star
12

covyd

Coronavirus Assistant in your terminal to help you prepare for COVID-19
JavaScript
8
star
13

nimbus-note-exporter

Export all your data from FuseBase (formerly Nimbus Note) including attachments, tags & folders
TypeScript
8
star
14

diffblazer

A super fast diffing utility for HTML and Plaintext
TypeScript
4
star
15

Memorandum

The simplest notepad for all your thoughts and notes.
C#
2
star
16

HandBook

The largest eBook search engine and downloader for Android, iOS, Windows, Linux, macOS and Windows Mobile!
2
star
17

ForLoopBenchmark

Performance benchmark of for loop and foreach loop
C#
1
star
18

recuv

โ›‘๏ธrecuv provides a cross-platform way for you to view, filter & restore any version of any file you edited in VSCode. Even the ones you deleted.
JavaScript
1
star