bnoordhuis / node-iconv

node.js iconv bindings - text recoding for fun and profit!
Other
799 stars 123 forks source link

iconv: Ensure all created buffers are filled. #182

Closed erinishimoticha closed 6 years ago

erinishimoticha commented 6 years ago

Use of the buffer constructor was deprecated in Node.js 10. The recommended way to create a new buffer is to use Buffer.alloc(num) when creating an empty buffer or Buffer.from(stringish) when creating a buffer from some given input.

Tests pass.

Closes #181.

bnoordhuis commented 6 years ago

Sorry, I missed the notification for this PR. I opted to merge #188 since that PR retains compatibility with older Node.js versions. Thanks though!