- fix exports for deno
- exclude mod.ts from type checking
-
added support for Deno
import bytes from 'https://deno.gg/bytes' bytes('25 KB') // 25000
- you now need to use node.js v18.
-
you can now choose your desired prefix.
import bytes from '@azury/bytes' bytes('25 KiB') // 25*1024 bytes('25 Kibibytes') // 25*1024 bytes(61217, { prefix: 'metric' }) // 61.22 KB bytes(61217, { prefix: 'binary' }) // 59.78 KiB bytes(61217) // 61.22 KB