max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
667 stars 114 forks source link

Avoid using deprecated Buffer constructor #142

Closed ChALkeR closed 6 years ago

ChALkeR commented 6 years ago

safe-buffer is already used and provides Buffer.from polyfill, so just use Buffer.from directly to avoid hitting deprecated API.

Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor

Tracking: https://github.com/nodejs/node/issues/19079

This was overlooked in c9312bd24d08271687d76da0fe3c83493871cf61.

/cc @mcollina

mcollina commented 6 years ago

Thanks, released!