talon-one / talon-one.js

==== THIS SDK IS DEPRECATED USE https://github.com/talon-one/talon_one.js INSTEAD ====
1 stars 0 forks source link

Changed Buffer's deprecated constructor usage #9

Closed altJake closed 5 years ago

altJake commented 6 years ago

We should not use Buffer constructor anymore: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor

It raises a deprecation warning and will be discarded completely in the future. At the moment I just change the usage of the constructor to call the recommended Buffer.from(...)

@mindreframer @aungerh @fmoeckel What do you think we should have a fallback for users using node in a version < 5.10.0 (where this Buffer.from was introduced)? Or should we state that we drop support in earlier versions?

altJake commented 6 years ago

That's how it should be done! Well maybe that should go on the road map

altJake commented 5 years ago

This problem was addressed already in the new js library of ours under https://github.com/talon-one/talon_one.js