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 nodejs-github-bot committed Aug 21, 2021
1 parent af45be7 commit 1deafcd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/internal/fs/cp/cp-sync.js
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 1deafcd

Please sign in to comment.