koichik / node-tunnel

Node HTTP/HTTPS Agents for tunneling proxies
MIT License
537 stars 78 forks source link

Use `Buffer.from` instead of `new Buffer` #44

Open ericyd opened 3 years ago

ericyd commented 3 years ago

new Buffer has been deprecated since Node v6.0.0

When this lib is bundled with zero-dependencies, e.g. in a serverless function like AWS lambda, this code emits a deprecation warning.

Not a huge deal but figured it might be nice to update it.

Buffer.from was added in Node v5.10.0 so this probably counts as a major version bump since it will break apps running Node < v5.10.0