Skip to content

Commit

Permalink
perf(plugins): replace Object.assign() with spread syntax (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Feb 17, 2023
1 parent c8b30d3 commit 9634321
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ async function plugin(server, options) {
outputEncoding: "UTF-8",
singlePage: true,
},
...options,
};
Object.assign(config, options);

/**
* Create copy of query string params and prune that,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-txt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ async function plugin(server, options) {
// Define any default settings the plugin should have to get up and running
const config = {
pdfToTxtOptions: { outputEncoding: "UTF-8" },
...options,
};
Object.assign(config, options);

/**
* Create copy of query string params and convert query string params to literal
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ async function plugin(server, options) {
noPictures: true,
outputHtml: true,
},
...options,
};
Object.assign(config, options);

// Build temporary file for UnRTF to write to, and following plugins to read from
const id = `docsmith_rtf-to-html_${randomUUID()}`;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-txt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ async function plugin(server, options) {
noPictures: true,
outputText: true,
},
...options,
};
Object.assign(config, options);

// Build temporary file for UnRTF to write to, and following plugins to read from
const id = `docsmith_rtf-to-txt_${randomUUID()}`;
Expand Down

0 comments on commit 9634321

Please sign in to comment.