Skip to content

Commit c067be4

Browse files
committed
fix(lint): resolve JavaScript lint error
1 parent befe02c commit c067be4

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/buffer/from-string/lib

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/buffer/from-string/lib/polyfill.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ function fromString( str, encoding ) {
4949
if ( !isString( encoding ) ) {
5050
throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', encoding ) );
5151
}
52-
return new Buffer( str, encoding ); // eslint-disable-line no-buffer-constructor
52+
return Buffer.from( str, encoding );
5353
}
54-
return new Buffer( str, 'utf8' ); // eslint-disable-line no-buffer-constructor
54+
return Buffer.from( str, 'utf8' );
5555
}
5656

5757

0 commit comments

Comments
 (0)