Skip to content

Commit fa13cc5

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/fs/rename/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 native = require( 'fs' ).rename;
2424

2525

2626
// MAIN //
@@ -42,7 +42,7 @@ var fs = require( 'fs' );
4242
* rename( './beep/boop.txt', './beep/foo.txt', done );
4343
*/
4444
function rename( oldPath, newPath, clbk ) {
45-
fs.rename( oldPath, newPath, clbk );
45+
native( oldPath, newPath, clbk );
4646
}
4747

4848

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

2525

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

0 commit comments

Comments
 (0)