Question : DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Answered by : emmanuel-mahuni
new Buffer(string, encoding) // Old
Buffer.from(string, encoding) // New
Source : https://stackoverflow.com/questions/52165333/deprecationwarning-buffer-is-deprecated-due-to-security-and-usability-issues/52165509 | Last Update : Tue, 18 May 21
Question : DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Answered by : emmanuel-mahuni
new Buffer(number) // Old
Buffer.alloc(number) // New
Source : https://stackoverflow.com/questions/52165333/deprecationwarning-buffer-is-deprecated-due-to-security-and-usability-issues/52165509 | Last Update : Tue, 18 May 21