Skip to content

Commit d1900f4

Browse files
cjihrigtargos
authored andcommitted
fs: combine require() and destructure
This commit combines two require() calls and subsequent destructuring operations. PR-URL: #39806 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 01093b0 commit d1900f4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/internal/fs/cp/cp-sync.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const {
2626
ERR_FS_EISDIR,
2727
ERR_INVALID_RETURN_VALUE,
2828
} = codes;
29-
const fs = require('fs');
3029
const {
3130
chmodSync,
3231
copyFileSync,
@@ -39,15 +38,14 @@ const {
3938
symlinkSync,
4039
unlinkSync,
4140
utimesSync,
42-
} = fs;
43-
const path = require('path');
41+
} = require('fs');
4442
const {
4543
dirname,
4644
isAbsolute,
4745
join,
4846
parse,
4947
resolve,
50-
} = path;
48+
} = require('path');
5149
const { isPromise } = require('util/types');
5250

5351
function cpSyncFn(src, dest, opts) {

0 commit comments

Comments
 (0)