Search packages, repositories and app categories

GitHub repositorysynw/filesize

filesize

Humanize file sizes

filesize project cover
Stars
46
Forks
14
Last push (UTC)
Mar 17, 2023
Project status
Archived

Original README

English project snapshot. Visit GitHub for the latest content.

Filesize

pub package Build Status Coverage Status

A micro library that provides an easy way to get human readable file size strings

Features

  • Size can be passed as number or as string
  • Optional parameter to specify numbers of digits after comma/point

Examples

filesize(1024);                   // "1 KB"
filesize(664365320);              // "633.59 MB"
filesize(4324324232343);          // "3.93 TB"

Optional parameter to specify numbers after comma/point:

filesize(664365320, 4);          // "633.5881 MB"
filesize(4324324232343, 3);      // "3.932 TB"

Inspired by filesize.js

synw GitHub avatar
GitHub author

synw ↗

"All that is gold does not glitter, not all those who wander are lost". Tolkien

LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 3 items

  • testDevelopment^1.16.8
  • test_covDevelopment^1.0.1
  • pedanticDevelopment^1.11.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗