
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@azury/bytes
Advanced tools
import bytes from 'https://deno.gg/bytes@v2'
npm i @azury/bytes
import bytes from '@azury/bytes'
/*
* Convert bytes to a readable size.
*/
bytes(100) // '100 B'
bytes(25000) // '25 KB'
bytes(50000000) // '50 MB'
bytes(1000000000000) // '1 TB'
bytes(100, { long: true }) // '100 Bytes'
bytes(25000, { long: true }) // '25 Kilobytes'
bytes(50000000, { long: true }) // '50 Megabytes'
bytes(1000000000000, { long: true }) // '1 Terabyte'
bytes(100, { format: 'array' }) // [100, 'B']
bytes(25000, { format: 'array' }) // [25, 'KB']
bytes(50000000, { long: true, format: 'array' }) // [50, 'Megabytes']
bytes(1000000000000, { long: true, format: 'array' }) // [1, 'Terabyte']
// binary prefix
bytes(25*1024, { prefix: 'binary' }) // '25 KiB'
bytes(25*1024, { long: true, prefix: 'binary' }) // '25 Kibibytes'
/*
* Convert a readable size to bytes.
*/
bytes('100 B') // 100
bytes('25 KB') // 25*1000
bytes('50 MB') // 50*1000*1000
bytes('1 TB') // 1000*1000*1000*1000
bytes('100 Bytes') // 100
bytes('25 Kilobytes') // 25*1000*1000
bytes('50 Megabytes') // 50*1000*1000
bytes('1 Terabyte') // 1000*1000*1000*1000
// binary prefix
bytes('25 Kibibytes') // 25*1024
bytes('50 Mebibytes') // 50*1024*1024
bytes('1 Tebibyte') // 1*1024*1024*1024
string | arraybinary | metricv2.1.0
added support for Deno
import bytes from 'https://deno.gg/bytes'
bytes('25 KB') // 25000
FAQs
A disk unit conversion library.
We found that @azury/bytes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.