Skip to content

Commit a0a9950

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/fs/read-dir/lib/async.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 readdir = require( 'fs' ).readdir;
2424

2525

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

5454

lib/node_modules/@stdlib/fs/read-dir/lib/sync.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 readdirSync = require( 'fs' ).readdirSync; // eslint-disable-line no-sync
2424

2525

2626
// MAIN //
@@ -40,7 +40,7 @@ var fs = require( 'fs' );
4040
*/
4141
function readDirSync( path ) {
4242
try {
43-
return fs.readdirSync( path ); // eslint-disable-line no-sync
43+
return readdirSync( path );
4444
} catch ( err ) {
4545
return err;
4646
}

0 commit comments

Comments
 (0)