add 3 tests, prettyBytes, primes & reducedFilter

updated prettyBytes example to output string
This commit is contained in:
Stefan Feješ
2018-01-10 14:01:35 +01:00
parent e86c1d89be
commit bf071b19e7
4 changed files with 21 additions and 3 deletions

View File

@ -19,7 +19,7 @@ const prettyBytes = (num, precision = 3, addSpace = true) => {
```
```js
prettyBytes(1000); // 1 KB
prettyBytes(-27145424323.5821, 5); // -27.145 GB
prettyBytes(123456789, 3, false); // 123MB
prettyBytes(1000); // "1 KB"
prettyBytes(-27145424323.5821, 5); // "-27.145 GB"
prettyBytes(123456789, 3, false); // "123MB"
```