refactor: replace Object.assign with spread syntax
This commit is contained in:
@@ -92,7 +92,7 @@ class ProgressBar {
|
||||
const progressBar = new ProgressBar();
|
||||
|
||||
export const download = async (url: string, dest: string, options?: DownloadOptions): Promise<void> => {
|
||||
options = Object.assign({}, DEFAULT_OPTIONS, options);
|
||||
options = { ...DEFAULT_OPTIONS, ...options };
|
||||
fse.ensureDirSync(dest);
|
||||
let stream: Request = got.stream(url);
|
||||
if (options.progress) {
|
||||
|
||||
Reference in New Issue
Block a user