diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-18 04:28:09 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-20 15:14:46 +0300 |
commit | 4b7a530f2b1a789b3feb64e3698d61b4ccc6bab5 (patch) | |
tree | 1cd8dd1d0ff4c113081502ddca54d5f9c7be8cb4 /lib/internal/child_process.js | |
parent | 6f8ccef74ec514292ebf8ee65602d8c109b0aa2b (diff) |
lib: switch to object spread where possible
Use the object spread notation instead of using Object.assign.
It is not only easier to read it is also faster as of V8 6.8.
PR-URL: https://github.com/nodejs/node/pull/25104
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/internal/child_process.js')
-rw-r--r-- | lib/internal/child_process.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 195cc156fcf..498dbf6a1ca 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -636,7 +636,7 @@ function setupChannel(target, channel) { throw new ERR_INVALID_ARG_TYPE('options', 'Object', options); } - options = Object.assign({ swallowErrors: false }, options); + options = { swallowErrors: false, ...options }; if (this.connected) { return this._send(message, handle, options, callback); |