Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecodrr/fdir
⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
https://github.com/thecodrr/fdir
directory directory-tree fast fast-glob fdir filesystem fs glob hacktoberfest javascript nodejs os sys walker
Last synced: 6 days ago
JSON representation
⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s
- Host: GitHub
- URL: https://github.com/thecodrr/fdir
- Owner: thecodrr
- License: mit
- Created: 2020-03-13T13:42:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T19:51:37.000Z (18 days ago)
- Last Synced: 2024-10-19T13:55:19.077Z (15 days ago)
- Topics: directory, directory-tree, fast, fast-glob, fdir, filesystem, fs, glob, hacktoberfest, javascript, nodejs, os, sys, walker
- Language: TypeScript
- Homepage: https://thecodrr.github.io/fdir/
- Size: 1.84 MB
- Stars: 1,487
- Watchers: 17
- Forks: 55
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome - thecodrr/fdir - ⚡ The fastest directory crawler & globbing library for NodeJS. Crawls 1m files in < 1s (TypeScript)
- my-awesome-list - fdir
- awesome-list - fdir
README
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._
## 🚄 Quickstart
### Installation
You can install using `npm`:
```sh
$ npm i fdir
```or Yarn:
```sh
$ yarn add fdir
```### Usage
```ts
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](/documentation.md).
## 📊 Benchmarks:
Please check the benchmark against the latest version [here](/BENCHMARKS.md).
## 🙏Used by:
`fdir` is downloaded over 200k+ 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. [rollup/plugins](https://github.com/rollup/plugins)
2. [SuperchupuDev/tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
3. [pulumi/pulumi](https://github.com/pulumi/pulumi)
4. [dotenvx/dotenvx](https://github.com/dotenvx/dotenvx)
5. [mdn/yari](https://github.com/mdn/yari)
6. [streetwriters/notesnook](https://github.com/streetwriters/notesnook)
7. [imba/imba](https://github.com/imba/imba)
8. [moroshko/react-scanner](https://github.com/moroshko/react-scanner)
9. [netlify/build](https://github.com/netlify/build)
10. [yassinedoghri/astro-i18next](https://github.com/yassinedoghri/astro-i18next)
11. [selfrefactor/rambda](https://github.com/selfrefactor/rambda)
12. [whyboris/Video-Hub-App](https://github.com/whyboris/Video-Hub-App)## 🦮 LICENSE
Copyright © 2024 Abdullah Atta under MIT. [Read full text here.](https://github.com/thecodrr/fdir/raw/master/LICENSE)