bun icon indicating copy to clipboard operation
bun copied to clipboard

Buffer implementation inconsistent with NodeJS - Bun outputs array buffer

Open aniketbiprojit opened this issue 3 years ago • 1 comments

.toString implementation is seems flawed or at least inconsistent with NodeJS:

Test.ts

import { readFileSync } from 'fs'

const completePath = './data'

const data = readFileSync(completePath).toString()

console.log({ data: data.toString() })

Outputs:

⋊> ts-node ./test.ts
{ data: 'data' }


⋊> bun test.ts
{ data: "100,97,116,97" }

⋊> npx tsc test.ts
⋊> node test.js
{ data: 'data' }

aniketbiprojit avatar Jul 31 '22 04:07 aniketbiprojit

#155

aniketbiprojit avatar Jul 31 '22 04:07 aniketbiprojit

Yes we will fix this, tracking the issue in #155

Electroid avatar Nov 03 '22 00:11 Electroid