humanize icon indicating copy to clipboard operation
humanize copied to clipboard

Enable custom unit names parameter for filesize()

Open aldipower opened this issue 9 years ago • 1 comments

Hi!

This enables to define custom unit names for Humanize.filesize() by adding a 'units' parameter as shown here:

Humanize.filesize(1024, 1024, 1, '.', ',', ' ', ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB']);

This PR also includes a correction to the README.md .

Review on Reviewable

aldipower avatar May 13 '15 14:05 aldipower

It would be really great if this will be bundled into an updated npm module.

aldipower avatar May 13 '15 14:05 aldipower