From c067be409b1dba9dff289c336a0fda63903b9b10 Mon Sep 17 00:00:00 2001 From: Anshu Date: Mon, 3 Mar 2025 19:42:09 +0530 Subject: [PATCH] fix(lint): resolve JavaScript lint error --- lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' ); }