1.0.3 • Published 9 months ago

fdir-size v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

fdir-size |⚔ Fastest Directory Size Calculator!

⚔ The Fastest*: Can sum ~100k file sizes in a second!

šŸ¤ Microscopic Small: No bin files, just pure ol' Javascript. The source code itself is minified to only 0.4 KB!

šŸ“¦ Just One Package: fdir-size uses it's one and only spine, fdir!

šŸ‹ Easy Peasy: Just one function will do!

*The fastest in NodeJS, some other programming languages can top that! Please check out the benchmark page for more.

Please support the creator of fdir, @thecoddr for making this project possible!

Usage

Prerequisites

  • NodeJS 14.14.0 or above
  • Any JS package manager
import getDirSize from "fdir-size";

const MB = 1000 * 1000;

// This sample directory has 100 files that has 1 MB each.
const dir = "./../my_directory";

const size = await getDirSize(dir);

// Console Output:
//   "./../my_directory" stores 100 MB.
console.log(`"${dir}" stores ${size / MB} MB.`);

Wiki

For usages, benchmarks, and tips, please check out the wiki page!

1.0.2

10 months ago

1.0.3

9 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.0

10 months ago