0.0.5 • Published 10 months ago

@elonehoo/concise-byte v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

concise-byte

Convert bytes to a human readable

install

# npm
npm i @elonehoo/concise-byte
# yarn
yarn add @elonehoo/concise-byte
#pnpm
pnpm i @elonehoo/concise-byte

usage

import conciseByte from '@elonehoo/concise-byte'

conciseByte(1337)//=> '1.34 kB'

conciseByte(100)//=> '100 B'

// Display with units of bits
conciseByte(1337, {bits: true})//=> '1.34 kbit'

// Display file size differences
conciseByte(42, {signed: true})//=> '+42 B'

// Localized output using German locale
conciseByte(1337, {locale: 'de'}) //=> '1,34 kB'
0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

12 months ago

0.0.2

1 year ago

0.0.1

2 years ago