Skip to content

Commit ea776ca

Browse files
committed
Import function rather than namespace
1 parent a0a9950 commit ea776ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/fs/read-file/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var fs = require( 'fs' );
23+
var readfile = require( 'fs' ).readFile;
2424

2525

2626
// MAIN //
@@ -48,7 +48,7 @@ function readFile() {
4848
for ( i = 0; i < args.length; i++ ) {
4949
args[ i ] = arguments[ i ];
5050
}
51-
fs.readFile.apply( null, args );
51+
readfile.apply( null, args );
5252
}
5353

5454

lib/node_modules/@stdlib/fs/read-file/lib/sync.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var fs = require( 'fs' );
23+
var readfileSync = require( 'fs' ).readFileSync; // eslint-disable-line no-sync
2424

2525

2626
// MAIN //
@@ -43,9 +43,9 @@ function readFileSync( file, options ) {
4343
var f;
4444
try {
4545
if ( arguments.length > 1 ) {
46-
f = fs.readFileSync( file, options ); // eslint-disable-line no-sync
46+
f = readfileSync( file, options );
4747
} else {
48-
f = fs.readFileSync( file ); // eslint-disable-line no-sync
48+
f = readfileSync( file );
4949
}
5050
} catch ( err ) {
5151
return err;

0 commit comments

Comments
 (0)