From e9b9a990a075c56988f9ff4694881470f397cb06 Mon Sep 17 00:00:00 2001 From: Jason Mulligan Date: Thu, 13 Jun 2013 17:22:45 -0400 Subject: [PATCH] Updating `README.md` examples --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 265c0d8..fb7f7d6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.png)](http://travis-ci.org/avoidwork/filesize.js) # filesize.js filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string. An optional second parameter is the decimal place to round to (default is 2), or _true_ which triggers Unix style output. An optional third parameter lets you disable `bit` sizes, e.g. "Kb". @@ -5,14 +6,14 @@ filesize.js provides a simple way to get a human readable file size string from ## Examples ``` js -filesize(500); // "3.91Kb" +filesize(500); // "3.91 Kb" filesize(500, true); // "3.9k" -filesize(1500); // "1.46KB" -filesize("1500000000"); // "1.40GB" -filesize("1500000000", 0); // "1GB" -filesize(1212312421412412); // "1.08PB" +filesize(1500); // "1.46 KB" +filesize("1500000000"); // "1.40 GB" +filesize("1500000000", 0); // "1 GB" +filesize(1212312421412412); // "1.08 PB" filesize(1212312421412412, true); // "1.1P" - shorthand output, similar to *nix "ls -lh" -filesize(265318, 2, false) // "259.10KB" - disabled `bit` sizes with third argument +filesize(265318, 2, false) // "259.10 KB" - disabled `bit` sizes with third argument ``` ## How can I load filesize.js? @@ -27,4 +28,4 @@ filesize.js is licensed under BSD-3 https://raw.github.com/avoidwork/filesize.js #### Copyright -Copyright (c) 2013, Jason Mulligan \ No newline at end of file +Copyright (c) 2013, Jason Mulligan