html-docx-js-typescript
html-docx-js-typescript copied to clipboard
convert new Buffer() to Buffer.from()
This PR changes two instances of new Buffer() to use Buffer.from() instead
Using new Buffer() in src/internal.ts causes the following deprecation warning.
(node:5153) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Link to information about the deprecation on Node's docs: https://nodejs.org/api/buffer.html#buffer_new_buffer_string_encoding