diff --git a/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js b/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js index 41ad74b07984..64d5e24262cb 100644 --- a/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js +++ b/lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js @@ -49,9 +49,9 @@ function fromString( str, encoding ) { if ( !isString( encoding ) ) { throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', encoding ) ); } - return new Buffer( str, encoding ); // eslint-disable-line no-buffer-constructor + return Buffer.from( str, encoding ); } - return new Buffer( str, 'utf8' ); // eslint-disable-line no-buffer-constructor + return Buffer.from( str, 'utf8' ); }