Closed ghost closed 5 years ago
Hi. Do you know a way to make it backwards-compatible? Node v4.2 doesn't support Buffer.from.
Good question - I made an edit and have tested with node v4.2.0 and node v10.16.0 and it seemed to work. Got the idea from https://stackoverflow.com/questions/42110902/choose-between-new-bufferstr-and-buffer-fromstr
Hopefully this is useful - I was getting a deprecation/security warning using the node library and reading js docs suggests going with Buffer.from is the way to go.