Which one is preferable: Buffer.from() or TextEncoder.encode()?

前端 未结 0 479
误落风尘
误落风尘 2021-01-31 13:41

From my understanding and API docs, in Node the following are equivalent and return an Uint8Array:

Buffer.from(someString, \'utf-8\')
<
相关标签:
回答
  • 消灭零回复
提交回复
热议问题