numbro
numbro copied to clipboard
byte formatting produces unexpected output
it('should reflect the numbro weirdness', () => {
const ret = numbro(695751).format({
output: 'byte',
base: 'decimal',
average: true,
totalLength: 4,
spaceSeparated: true,
})
expect(ret).toBe('0.696 k KB')
})
It seems that shouldn't be expected. Something like 696 KB or 696.0 KB would make more sense. I've tried different options to workaround this but the extra k is always there.