Overview of filesize
masterfilesize is a modern JavaScript library designed to convert numeric byte values into human-readable file size strings. It is suitable for web applications, mobile apps, and cloud platforms.
Key Features
- Multiple Unit Standards: Supports SI (decimal), IEC (binary), and JEDEC standards.
- Localization Support: Full internationalization with locale-specific formatting.
- Flexible Output: Can return results as a String, Array, Object, or Exponent format.
- BigInt Support: Capable of handling extremely large file sizes using
BigInt. - Customizable Formatting: Control over precision, rounding, symbols, and spacing.
- Functional Programming: Supports partial application for reusing configurations.
Browser & Runtime Support
- Node.js: 10.4.0+
- Modern Browsers: Requires ES6+ support.
- Mobile: iOS Safari 10+, Android Chrome 51+.
- Server Environments: Deno, Bun, Cloudflare Workers.