mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Use object destructuring, rather than the merge
helper, in the gulpfile
This helper function was originally added in PR 1953, eleven years ago, at which point object destructuring didn't exist.
This commit is contained in:
parent
22d6d95f03
commit
ae664ea8e0
2 changed files with 63 additions and 83 deletions
17
external/builder/builder.mjs
vendored
17
external/builder/builder.mjs
vendored
|
@ -229,19 +229,4 @@ function preprocess(inFilename, outFilename, defines) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge two defines arrays. Values in the second param will override values in
|
||||
* the first.
|
||||
*/
|
||||
function merge(defaults, defines) {
|
||||
const ret = Object.create(null);
|
||||
for (const key in defaults) {
|
||||
ret[key] = defaults[key];
|
||||
}
|
||||
for (const key in defines) {
|
||||
ret[key] = defines[key];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
export { merge, preprocess };
|
||||
export { preprocess };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue