Skip to content

Commit

Permalink
fs: combine require() and destructure
Browse files Browse the repository at this point in the history
This commit combines two require() calls and subsequent
destructuring operations.

PR-URL: #39806
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and targos committed Aug 22, 2021
1 parent 01093b0 commit d1900f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/internal/fs/cp/cp-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const {
ERR_FS_EISDIR,
ERR_INVALID_RETURN_VALUE,
} = codes;
const fs = require('fs');
const {
chmodSync,
copyFileSync,
Expand All @@ -39,15 +38,14 @@ const {
symlinkSync,
unlinkSync,
utimesSync,
} = fs;
const path = require('path');
} = require('fs');
const {
dirname,
isAbsolute,
join,
parse,
resolve,
} = path;
} = require('path');
const { isPromise } = require('util/types');

function cpSyncFn(src, dest, opts) {
Expand Down

0 comments on commit d1900f4

Please sign in to comment.