@depup/pretty-bytes 7.1.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @depup/pretty-bytes
2
+
3
+ > Dependency-bumped version of [pretty-bytes](https://www.npmjs.com/package/pretty-bytes)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/pretty-bytes
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [pretty-bytes](https://www.npmjs.com/package/pretty-bytes) @ 7.1.0 |
17
+ | Processed | 2026-03-09 |
18
+ | Smoke test | passed |
19
+ | Deps updated | 0 |
20
+
21
+ ---
22
+
23
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/pretty-bytes
24
+
25
+ License inherited from the original package.
package/index.d.ts ADDED
@@ -0,0 +1,181 @@
1
+ export type Options = {
2
+ /**
3
+ Include plus sign for positive numbers. If the difference is exactly zero a space character will be prepended instead for better alignment.
4
+
5
+ @default false
6
+ */
7
+ readonly signed?: boolean;
8
+
9
+ /**
10
+ - If `false`: Output won't be localized.
11
+ - If `true`: Localize the output using the system/browser locale.
12
+ - If `string`: Expects a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) (For example: `en`, `de`, …)
13
+ - If `string[]`: Expects a list of [BCP 47 language tags](https://en.wikipedia.org/wiki/IETF_language_tag) (For example: `en`, `de`, …)
14
+
15
+ @default false
16
+ */
17
+ readonly locale?: boolean | string | readonly string[];
18
+
19
+ /**
20
+ Format the number as [bits](https://en.wikipedia.org/wiki/Bit) instead of [bytes](https://en.wikipedia.org/wiki/Byte). This can be useful when, for example, referring to [bit rate](https://en.wikipedia.org/wiki/Bit_rate).
21
+
22
+ @default false
23
+
24
+ @example
25
+ ```
26
+ import prettyBytes from 'pretty-bytes';
27
+
28
+ prettyBytes(1337, {bits: true});
29
+ //=> '1.34 kbit'
30
+ ```
31
+ */
32
+ readonly bits?: boolean;
33
+
34
+ /**
35
+ Format the number using the [Binary Prefix](https://en.wikipedia.org/wiki/Binary_prefix) instead of the [SI Prefix](https://en.wikipedia.org/wiki/SI_prefix). This can be useful for presenting memory amounts. However, this should not be used for presenting file sizes.
36
+
37
+ @default false
38
+
39
+ @example
40
+ ```
41
+ import prettyBytes from 'pretty-bytes';
42
+
43
+ prettyBytes(1000, {binary: true});
44
+ //=> '1000 B'
45
+
46
+ prettyBytes(1024, {binary: true});
47
+ //=> '1 KiB'
48
+ ```
49
+ */
50
+ readonly binary?: boolean;
51
+
52
+ /**
53
+ The minimum number of fraction digits to display.
54
+
55
+ @default undefined
56
+
57
+ If neither `minimumFractionDigits` nor `maximumFractionDigits` is set, the default behavior is to round to 3 significant digits.
58
+
59
+ Note: When `minimumFractionDigits` or `maximumFractionDigits` is specified, values are truncated instead of rounded to provide more intuitive results for file sizes.
60
+
61
+ @example
62
+ ```
63
+ import prettyBytes from 'pretty-bytes';
64
+
65
+ // Show the number with at least 3 fractional digits
66
+ prettyBytes(1900, {minimumFractionDigits: 3});
67
+ //=> '1.900 kB'
68
+
69
+ prettyBytes(1900);
70
+ //=> '1.9 kB'
71
+ ```
72
+ */
73
+ readonly minimumFractionDigits?: number;
74
+
75
+ /**
76
+ The maximum number of fraction digits to display.
77
+
78
+ @default undefined
79
+
80
+ If neither `minimumFractionDigits` nor `maximumFractionDigits` is set, the default behavior is to round to 3 significant digits.
81
+
82
+ Note: When `minimumFractionDigits` or `maximumFractionDigits` is specified, values are truncated instead of rounded to provide more intuitive results for file sizes.
83
+
84
+ @example
85
+ ```
86
+ import prettyBytes from 'pretty-bytes';
87
+
88
+ // Show the number with at most 1 fractional digit
89
+ prettyBytes(1920, {maximumFractionDigits: 1});
90
+ //=> '1.9 kB'
91
+
92
+ prettyBytes(1920);
93
+ //=> '1.92 kB'
94
+ ```
95
+ */
96
+ readonly maximumFractionDigits?: number;
97
+
98
+ /**
99
+ Put a space between the number and unit.
100
+
101
+ @default true
102
+
103
+ @example
104
+ ```
105
+ import prettyBytes from 'pretty-bytes';
106
+
107
+ prettyBytes(1920, {space: false});
108
+ //=> '1.92kB'
109
+
110
+ prettyBytes(1920);
111
+ //=> '1.92 kB'
112
+ ```
113
+ */
114
+ readonly space?: boolean;
115
+
116
+ /**
117
+ Use a non-breaking space instead of a regular space to prevent the unit from wrapping to a new line.
118
+
119
+ Has no effect when `space` is `false`.
120
+
121
+ @default false
122
+ */
123
+ readonly nonBreakingSpace?: boolean;
124
+
125
+ /**
126
+ Pad the output to a fixed width by right-aligning it.
127
+
128
+ Useful for creating aligned columns in tables or progress bars.
129
+
130
+ If the output is longer than the specified width, no padding is applied.
131
+
132
+ Must be a non-negative integer. Throws a `TypeError` for invalid values.
133
+
134
+ @default undefined
135
+
136
+ @example
137
+ ```
138
+ import prettyBytes from 'pretty-bytes';
139
+
140
+ prettyBytes(1337, {fixedWidth: 10});
141
+ //=> ' 1.34 kB'
142
+
143
+ prettyBytes(100_000, {fixedWidth: 10});
144
+ //=> ' 100 kB'
145
+
146
+ // Useful for progress bars and tables
147
+ [1000, 10_000, 100_000].map(bytes => prettyBytes(bytes, {fixedWidth: 8}));
148
+ //=> [' 1 kB', ' 10 kB', ' 100 kB']
149
+ ```
150
+ */
151
+ readonly fixedWidth?: number;
152
+ };
153
+
154
+ /**
155
+ Convert bytes to a human readable string: `1337` → `1.34 kB`.
156
+
157
+ @param number - The number to format.
158
+
159
+ @example
160
+ ```
161
+ import prettyBytes from 'pretty-bytes';
162
+
163
+ prettyBytes(1337);
164
+ //=> '1.34 kB'
165
+
166
+ prettyBytes(100);
167
+ //=> '100 B'
168
+
169
+ // Display file size differences
170
+ prettyBytes(42, {signed: true});
171
+ //=> '+42 B'
172
+
173
+ // Localized output using German locale
174
+ prettyBytes(1337, {locale: 'de'});
175
+ //=> '1,34 kB'
176
+ ```
177
+ */
178
+ export default function prettyBytes(
179
+ number: number | bigint,
180
+ options?: Options
181
+ ): string;
package/index.js ADDED
@@ -0,0 +1,178 @@
1
+ const BYTE_UNITS = [
2
+ 'B',
3
+ 'kB',
4
+ 'MB',
5
+ 'GB',
6
+ 'TB',
7
+ 'PB',
8
+ 'EB',
9
+ 'ZB',
10
+ 'YB',
11
+ ];
12
+
13
+ const BIBYTE_UNITS = [
14
+ 'B',
15
+ 'KiB',
16
+ 'MiB',
17
+ 'GiB',
18
+ 'TiB',
19
+ 'PiB',
20
+ 'EiB',
21
+ 'ZiB',
22
+ 'YiB',
23
+ ];
24
+
25
+ const BIT_UNITS = [
26
+ 'b',
27
+ 'kbit',
28
+ 'Mbit',
29
+ 'Gbit',
30
+ 'Tbit',
31
+ 'Pbit',
32
+ 'Ebit',
33
+ 'Zbit',
34
+ 'Ybit',
35
+ ];
36
+
37
+ const BIBIT_UNITS = [
38
+ 'b',
39
+ 'kibit',
40
+ 'Mibit',
41
+ 'Gibit',
42
+ 'Tibit',
43
+ 'Pibit',
44
+ 'Eibit',
45
+ 'Zibit',
46
+ 'Yibit',
47
+ ];
48
+
49
+ /*
50
+ Formats the given number using `Number#toLocaleString`.
51
+ - If locale is a string, the value is expected to be a locale-key (for example: `de`).
52
+ - If locale is true, the system default locale is used for translation.
53
+ - If no value for locale is specified, the number is returned unmodified.
54
+ */
55
+ const toLocaleString = (number, locale, options) => {
56
+ let result = number;
57
+ if (typeof locale === 'string' || Array.isArray(locale)) {
58
+ result = number.toLocaleString(locale, options);
59
+ } else if (locale === true || options !== undefined) {
60
+ result = number.toLocaleString(undefined, options);
61
+ }
62
+
63
+ return result;
64
+ };
65
+
66
+ const log10 = numberOrBigInt => {
67
+ if (typeof numberOrBigInt === 'number') {
68
+ return Math.log10(numberOrBigInt);
69
+ }
70
+
71
+ const string = numberOrBigInt.toString(10);
72
+
73
+ return string.length + Math.log10(`0.${string.slice(0, 15)}`);
74
+ };
75
+
76
+ const log = numberOrBigInt => {
77
+ if (typeof numberOrBigInt === 'number') {
78
+ return Math.log(numberOrBigInt);
79
+ }
80
+
81
+ return log10(numberOrBigInt) * Math.log(10);
82
+ };
83
+
84
+ const divide = (numberOrBigInt, divisor) => {
85
+ if (typeof numberOrBigInt === 'number') {
86
+ return numberOrBigInt / divisor;
87
+ }
88
+
89
+ const integerPart = numberOrBigInt / BigInt(divisor);
90
+ const remainder = numberOrBigInt % BigInt(divisor);
91
+ return Number(integerPart) + (Number(remainder) / divisor);
92
+ };
93
+
94
+ const applyFixedWidth = (result, fixedWidth) => {
95
+ if (fixedWidth === undefined) {
96
+ return result;
97
+ }
98
+
99
+ if (typeof fixedWidth !== 'number' || !Number.isSafeInteger(fixedWidth) || fixedWidth < 0) {
100
+ throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof fixedWidth}: ${fixedWidth}`);
101
+ }
102
+
103
+ if (fixedWidth === 0) {
104
+ return result;
105
+ }
106
+
107
+ return result.length < fixedWidth ? result.padStart(fixedWidth, ' ') : result;
108
+ };
109
+
110
+ const buildLocaleOptions = options => {
111
+ const {minimumFractionDigits, maximumFractionDigits} = options;
112
+
113
+ if (minimumFractionDigits === undefined && maximumFractionDigits === undefined) {
114
+ return undefined;
115
+ }
116
+
117
+ return {
118
+ ...(minimumFractionDigits !== undefined && {minimumFractionDigits}),
119
+ ...(maximumFractionDigits !== undefined && {maximumFractionDigits}),
120
+ roundingMode: 'trunc',
121
+ };
122
+ };
123
+
124
+ export default function prettyBytes(number, options) {
125
+ if (typeof number !== 'bigint' && !Number.isFinite(number)) {
126
+ throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
127
+ }
128
+
129
+ options = {
130
+ bits: false,
131
+ binary: false,
132
+ space: true,
133
+ nonBreakingSpace: false,
134
+ ...options,
135
+ };
136
+
137
+ const UNITS = options.bits
138
+ ? (options.binary ? BIBIT_UNITS : BIT_UNITS)
139
+ : (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
140
+
141
+ const separator = options.space ? (options.nonBreakingSpace ? '\u00A0' : ' ') : '';
142
+
143
+ // Handle signed zero case
144
+ const isZero = typeof number === 'number' ? number === 0 : number === 0n;
145
+ if (options.signed && isZero) {
146
+ const result = ` 0${separator}${UNITS[0]}`;
147
+ return applyFixedWidth(result, options.fixedWidth);
148
+ }
149
+
150
+ const isNegative = number < 0;
151
+ const prefix = isNegative ? '-' : (options.signed ? '+' : '');
152
+
153
+ if (isNegative) {
154
+ number = -number;
155
+ }
156
+
157
+ const localeOptions = buildLocaleOptions(options);
158
+ let result;
159
+
160
+ if (number < 1) {
161
+ const numberString = toLocaleString(number, options.locale, localeOptions);
162
+ result = prefix + numberString + separator + UNITS[0];
163
+ } else {
164
+ const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
165
+ number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
166
+
167
+ if (!localeOptions) {
168
+ const minPrecision = Math.max(3, Math.floor(number).toString().length);
169
+ number = number.toPrecision(minPrecision);
170
+ }
171
+
172
+ const numberString = toLocaleString(Number(number), options.locale, localeOptions);
173
+ const unit = UNITS[exponent];
174
+ result = prefix + numberString + separator + unit;
175
+ }
176
+
177
+ return applyFixedWidth(result, options.fixedWidth);
178
+ }
package/license ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@depup/pretty-bytes",
3
+ "version": "7.1.0-depup.0",
4
+ "description": "[DepUp] Convert bytes to a human readable string: 1337 → 1.34 kB",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/pretty-bytes",
7
+ "funding": "https://github.com/sponsors/sindresorhus",
8
+ "author": {
9
+ "name": "Sindre Sorhus",
10
+ "email": "sindresorhus@gmail.com",
11
+ "url": "https://sindresorhus.com"
12
+ },
13
+ "type": "module",
14
+ "exports": {
15
+ "types": "./index.d.ts",
16
+ "default": "./index.js"
17
+ },
18
+ "sideEffects": false,
19
+ "engines": {
20
+ "node": ">=20"
21
+ },
22
+ "scripts": {
23
+ "test": "xo && ava && tsd"
24
+ },
25
+ "files": [
26
+ "index.js",
27
+ "index.d.ts"
28
+ ],
29
+ "keywords": [
30
+ "depup",
31
+ "dependency-bumped",
32
+ "updated-deps",
33
+ "pretty-bytes",
34
+ "pretty",
35
+ "bytes",
36
+ "byte",
37
+ "filesize",
38
+ "size",
39
+ "file",
40
+ "human",
41
+ "humanized",
42
+ "readable",
43
+ "si",
44
+ "data",
45
+ "locale",
46
+ "localization",
47
+ "localized"
48
+ ],
49
+ "devDependencies": {
50
+ "ava": "^6.2.0",
51
+ "tsd": "^0.32.0",
52
+ "xo": "^0.60.0"
53
+ },
54
+ "depup": {
55
+ "changes": {},
56
+ "depsUpdated": 0,
57
+ "originalPackage": "pretty-bytes",
58
+ "originalVersion": "7.1.0",
59
+ "processedAt": "2026-03-09T04:51:22.346Z",
60
+ "smokeTest": "passed"
61
+ }
62
+ }
package/readme.md ADDED
@@ -0,0 +1,217 @@
1
+ # pretty-bytes
2
+
3
+ > Convert bytes to a human readable string: `1337` → `1.34 kB`
4
+
5
+ Useful for displaying file sizes for humans.
6
+
7
+ *Note that it uses base-10 (e.g. kilobyte).
8
+ [Read about the difference between kilobyte and kibibyte.](https://web.archive.org/web/20150324153922/https://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/)*
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install pretty-bytes
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```js
19
+ import prettyBytes from 'pretty-bytes';
20
+
21
+ prettyBytes(1337);
22
+ //=> '1.34 kB'
23
+
24
+ prettyBytes(100);
25
+ //=> '100 B'
26
+
27
+ // Display with units of bits
28
+ prettyBytes(1337, {bits: true});
29
+ //=> '1.34 kbit'
30
+
31
+ // Display file size differences
32
+ prettyBytes(42, {signed: true});
33
+ //=> '+42 B'
34
+
35
+ // Localized output using German locale
36
+ prettyBytes(1337, {locale: 'de'});
37
+ //=> '1,34 kB'
38
+
39
+ // Fixed width for alignment (useful for progress bars and tables)
40
+ prettyBytes(1337, {fixedWidth: 8});
41
+ //=> ' 1.34 kB'
42
+ ```
43
+
44
+ ## API
45
+
46
+ ### prettyBytes(number, options?)
47
+
48
+ #### number
49
+
50
+ Type: `number | bigint`
51
+
52
+ The number to format.
53
+
54
+ #### options
55
+
56
+ Type: `object`
57
+
58
+ ##### signed
59
+
60
+ Type: `boolean`\
61
+ Default: `false`
62
+
63
+ Include plus sign for positive numbers. If the difference is exactly zero a space character will be prepended instead for better alignment.
64
+
65
+ ##### bits
66
+
67
+ Type: `boolean`\
68
+ Default: `false`
69
+
70
+ Format the number as [bits](https://en.wikipedia.org/wiki/Bit) instead of [bytes](https://en.wikipedia.org/wiki/Byte). This can be useful when, for example, referring to [bit rate](https://en.wikipedia.org/wiki/Bit_rate).
71
+
72
+ ```js
73
+ import prettyBytes from 'pretty-bytes';
74
+
75
+ prettyBytes(1337, {bits: true});
76
+ //=> '1.34 kbit'
77
+ ```
78
+
79
+ ##### binary
80
+
81
+ Type: `boolean`\
82
+ Default: `false`
83
+
84
+ Format the number using the [Binary Prefix](https://en.wikipedia.org/wiki/Binary_prefix) instead of the [SI Prefix](https://en.wikipedia.org/wiki/SI_prefix). This can be useful for presenting memory amounts. However, this should not be used for presenting file sizes.
85
+
86
+ ```js
87
+ import prettyBytes from 'pretty-bytes';
88
+
89
+ prettyBytes(1000, {binary: true});
90
+ //=> '1000 B'
91
+
92
+ prettyBytes(1024, {binary: true});
93
+ //=> '1 KiB'
94
+ ```
95
+
96
+ ##### locale
97
+
98
+ Type: `boolean | string | string[]`\
99
+ Default: `false`
100
+
101
+ - If `false`: Output won't be localized.
102
+ - If `true`: Localize the output using the system/browser locale.
103
+ - If `string`: Expects a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) (For example: `en`, `de`, …)
104
+ - If `string[]`: Expects a list of [BCP 47 language tags](https://en.wikipedia.org/wiki/IETF_language_tag) (For example: `en`, `de`, …)
105
+
106
+ > [!IMPORTANT]
107
+ > Only the number and decimal separator are localized. The unit title is not and will not be localized.
108
+
109
+ ##### minimumFractionDigits
110
+
111
+ Type: `number`\
112
+ Default: `undefined`
113
+
114
+ The minimum number of fraction digits to display.
115
+
116
+ If neither `minimumFractionDigits` nor `maximumFractionDigits` is set, the default behavior is to round to 3 significant digits.
117
+
118
+ > [!NOTE]
119
+ > When `minimumFractionDigits` or `maximumFractionDigits` is specified, values are truncated instead of rounded to provide more intuitive results for file sizes.
120
+
121
+ ```js
122
+ import prettyBytes from 'pretty-bytes';
123
+
124
+ // Show the number with at least 3 fractional digits
125
+ prettyBytes(1900, {minimumFractionDigits: 3});
126
+ //=> '1.900 kB'
127
+
128
+ prettyBytes(1900);
129
+ //=> '1.9 kB'
130
+ ```
131
+
132
+ ##### maximumFractionDigits
133
+
134
+ Type: `number`\
135
+ Default: `undefined`
136
+
137
+ The maximum number of fraction digits to display.
138
+
139
+ If neither `minimumFractionDigits` nor `maximumFractionDigits` is set, the default behavior is to round to 3 significant digits.
140
+
141
+ > [!NOTE]
142
+ > When `minimumFractionDigits` or `maximumFractionDigits` is specified, values are truncated instead of rounded to provide more intuitive results for file sizes.
143
+
144
+ ```js
145
+ import prettyBytes from 'pretty-bytes';
146
+
147
+ // Show the number with at most 1 fractional digit
148
+ prettyBytes(1920, {maximumFractionDigits: 1});
149
+ //=> '1.9 kB'
150
+
151
+ prettyBytes(1920);
152
+ //=> '1.92 kB'
153
+ ```
154
+
155
+ ##### space
156
+
157
+ Type: `boolean`\
158
+ Default: `true`
159
+
160
+ Put a space between the number and unit.
161
+
162
+ ```js
163
+ import prettyBytes from 'pretty-bytes';
164
+
165
+ prettyBytes(1920, {space: false});
166
+ //=> '1.92kB'
167
+
168
+ prettyBytes(1920);
169
+ //=> '1.92 kB'
170
+ ```
171
+
172
+ ##### nonBreakingSpace
173
+
174
+ Type: `boolean`\
175
+ Default: `false`
176
+
177
+ Use a non-breaking space instead of a regular space to prevent the unit from wrapping to a new line.
178
+
179
+ Has no effect when `space` is `false`.
180
+
181
+ ##### fixedWidth
182
+
183
+ Type: `number`\
184
+ Default: `undefined`
185
+
186
+ Pad the output to a fixed width by right-aligning it.
187
+
188
+ Useful for creating aligned columns in tables or progress bars.
189
+
190
+ If the output is longer than the specified width, no padding is applied.
191
+
192
+ Must be a non-negative integer. Throws a `TypeError` for invalid values.
193
+
194
+ ```js
195
+ import prettyBytes from 'pretty-bytes';
196
+
197
+ prettyBytes(1337, {fixedWidth: 10});
198
+ //=> ' 1.34 kB'
199
+
200
+ prettyBytes(100_000, {fixedWidth: 10});
201
+ //=> ' 100 kB'
202
+
203
+ // Useful for progress bars and tables
204
+ [1000, 10_000, 100_000].map(bytes => prettyBytes(bytes, {fixedWidth: 8}));
205
+ //=> [' 1 kB', ' 10 kB', ' 100 kB']
206
+ ```
207
+
208
+ ## FAQ
209
+
210
+ ### Why kB and not KB?
211
+
212
+ `k` is the [standardized SI prefix](https://en.wikipedia.org/wiki/Metric_prefix) for kilo.
213
+
214
+ ## Related
215
+
216
+ - [pretty-bytes-cli](https://github.com/sindresorhus/pretty-bytes-cli) - CLI for this module
217
+ - [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string