avoidwork / filesize.js

JavaScript library to generate a human readable String describing the file size
https://filesizejs.com
BSD 3-Clause "New" or "Revised" License
1.61k stars 97 forks source link

Fixing the `base` value when using `iec` standard #153

Closed avoidwork closed 2 years ago

avoidwork commented 2 years ago
PS C:\Users\jason\Projects\filesize.js\lib> node            
Welcome to Node.js v18.2.0.
Type ".help" for more information.
> const filesize = require('./filesize.es6.js')
undefined
> console.log(filesize(265318, {standard: "jedec"}), filesize(265318, {standard: "iec"}))
259.1 KB 265.32 KiB
undefined
avoidwork commented 2 years ago

This PR wasn't published - version burned; assignment happened after a ternary that uses base.