@azury/bytes
Installation
npm i @azury/bytes
Usage
import bytes from '@azury/bytes'
bytes(100)
bytes(25000)
bytes(50000000)
bytes(1000000000000)
bytes(100, { long: true })
bytes(25000, { long: true })
bytes(50000000, { long: true })
bytes(1000000000000, { long: true })
bytes(100, { format: 'array' })
bytes(25000, { format: 'array' })
bytes(50000000, { long: true, format: 'array' })
bytes(1000000000000, { long: true, format: 'array' })
bytes('100 B')
bytes('25 KB')
bytes('50 MB')
bytes('1 TB')
bytes('100 Bytes')
bytes('25 Kilobytes')
bytes('50 Megabytes')
bytes('1 Terabyte')
Configuration
- long
- format:
string
| array
(only available when converting bytes to a readable size)