UNPKG
@amxdev/format-bytes
Version:
latest (1.0.1)
1.0.1
1.0.0
Format bytes as human-readable string (e.g. 2.5 MB).
@amxdev/format-bytes
/
README.md
22 lines
(13 loc)
•
269 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# @amxdev/format-bytes
> Format
bytes
as
human-readable string (e.g.
2.5
MB).
## Install
```bash npm install @amxdev/
format
-
bytes
```
## Usage
```ts
import
{ formatbytes }
from
"@amxdev/format-bytes"
; formatbytes(formatBytes(
1024
) //
"1 KB"
) ```
## License
MIT