@@ -9,34 +9,37 @@ filesize.js provides a simple way to get a human readable file size string from
9
9
` filesize() ` accepts an optional descriptor Object as a second argument, so you can customize the output.
10
10
11
11
### base
12
- _ *** (number)** *_ Number base, default is ` 2 `
12
+ _ * (number)* _ Number base, default is ` 2 `
13
13
14
14
### bits
15
- _ *** (boolean)** *_ Enables ` bit ` sizes, default is ` false `
15
+ _ * (boolean)* _ Enables ` bit ` sizes, default is ` false `
16
16
17
17
### exponent
18
- _ *** (number)*** _ Specifies the SI suffix via exponent, e.g. ` 2 ` is ` MB ` for bytes, default is ` -1 `
18
+ _ * (number)* _ Specifies the SI suffix via exponent, e.g. ` 2 ` is ` MB ` for bytes, default is ` -1 `
19
+
20
+ ### longform
21
+ _ * (boolean)* _ Enables long form of unit of measure, default is ` false `
19
22
20
23
### output
21
- _ *** (string)** *_ Output of function (` array ` , ` exponent ` , ` object ` , or ` string ` ), default is ` string `
24
+ _ * (string)* _ Output of function (` array ` , ` exponent ` , ` object ` , or ` string ` ), default is ` string `
22
25
23
26
### round
24
- _ *** (number)** *_ Decimal place, default is ` 2 `
27
+ _ * (number)* _ Decimal place, default is ` 2 `
25
28
26
29
### spacer
27
- _ *** (string)** *_ Character between the ` result ` and ` suffix ` , default is ` " " `
30
+ _ * (string)* _ Character between the ` result ` and ` suffix ` , default is ` " " `
28
31
29
32
### standard
30
- _ *** (string)** *_ Standard unit of measure, can be ` iec ` or ` jedec ` , default is ` jedec ` ; can be overruled by ` base `
33
+ _ * (string)* _ Standard unit of measure, can be ` iec ` or ` jedec ` , default is ` jedec ` ; can be overruled by ` base `
31
34
32
35
### symbols
33
- _ *** (object)** *_ Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
36
+ _ * (object)* _ Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
34
37
35
38
### suffixes (deprecated: use 'symbols')
36
- _ *** (object)** *_ Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
39
+ _ * (object)* _ Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
37
40
38
41
### unix
39
- _ *** (boolean)** *_ Enables unix style human readable output, e.g ` ls -lh ` , default is ` false `
42
+ _ * (boolean)* _ Enables unix style human readable output, e.g ` ls -lh ` , default is ` false `
40
43
41
44
## Examples
42
45
@@ -53,6 +56,7 @@ filesize(1024); // "1 KB"
53
56
filesize (1024 , {exponent: 0 }); // "1024 B"
54
57
filesize (1024 , {output: " exponent" }); // 1
55
58
filesize (265318 , {standard: " iec" }); // "259.1 KiB"
59
+ filesize (265318 , {standard: " iec" , longform: true }); // "259.1 kibibytes"
56
60
```
57
61
58
62
## Partial Application
0 commit comments