MyGit

thecodrr/fdir

Fork: 58 Star: 1525 (更新于 2024-12-06 09:39:10)

license: MIT

Language: TypeScript .

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

最后发布版本: v6.3.0 ( 2024-08-25 21:58:51)

官方网址 GitHub网址

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:

$ 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 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
  2. SuperchupuDev/tinyglobby
  3. pulumi/pulumi
  4. dotenvx/dotenvx
  5. mdn/yari
  6. streetwriters/notesnook
  7. imba/imba
  8. moroshko/react-scanner
  9. netlify/build
  10. yassinedoghri/astro-i18next
  11. selfrefactor/rambda
  12. whyboris/Video-Hub-App

🦮 LICENSE

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

最近版本更新:(数据更新于 2024-09-25 01:25:17)

2024-08-25 21:58:51 v6.3.0

2024-07-22 12:24:31 v6.2.0

2023-11-06 01:28:54 v6.1.1

2023-08-14 02:33:27 v6.1.0

2023-08-01 05:27:58 v6.0.2

2023-02-09 15:48:20 v6.0.1

2023-02-09 02:24:36 v6.0.0

2022-10-19 01:43:32 v5.3.0

2022-10-18 02:39:56 v5.2.1

2022-01-18 14:17:47 v5.2.0

主题(topics):

directory, directory-tree, fast, fast-glob, fdir, filesystem, fs, glob, hacktoberfest, javascript, nodejs, os, sys, walker

thecodrr/fdir同语言 TypeScript最近更新仓库

2024-12-21 21:40:12 lobehub/lobe-chat

2024-12-21 12:01:51 siyuan-note/siyuan

2024-12-21 10:57:01 ai16z/eliza

2024-12-21 09:15:35 MetaCubeX/metacubexd

2024-12-21 04:50:26 mediar-ai/screenpipe

2024-12-20 19:36:48 vitejs/vite