Index: options.js |
=================================================================== |
--- a/options.js |
+++ b/options.js |
@@ -32,22 +32,17 @@ |
* value arguments are optional their index must be |
* maintained. E.g. if you omit the first value you |
* must omit the second too.) |
*/ |
function wrapper(baseMessage, ...paramKeys) |
{ |
return function(...paramValues /* , callback */) |
{ |
- let message = Object.create(null); |
- for (let key in baseMessage) |
- { |
- if (baseMessage.hasOwnProperty(key)) |
- message[key] = baseMessage[key]; |
- } |
+ let message = Object.assign(Object.create(null), baseMessage); |
let callback; |
if (paramValues.length > 0) |
{ |
let lastArg = paramValues[paramValues.length - 1]; |
if (typeof lastArg == "function") |
callback = lastArg; |