From 0dd710e580878dfc7c0decd120d30d0b2163527d Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 9 Nov 2017 08:22:15 -0800 Subject: [PATCH] Replace _.extend with spread --- .../ddp-client/common/livedata_connection.js | 39 +++++++++---------- packages/ddp-client/server/server.js | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/packages/ddp-client/common/livedata_connection.js b/packages/ddp-client/common/livedata_connection.js index 4b0033731a..cc1e2b6eb7 100644 --- a/packages/ddp-client/common/livedata_connection.js +++ b/packages/ddp-client/common/livedata_connection.js @@ -45,27 +45,26 @@ class MongoIDMap extends IdMap { export class Connection { constructor(url, options) { var self = this; - options = _.extend( - { - onConnected() {}, - onDDPVersionNegotiationFailure(description) { - Meteor._debug(description); - }, - heartbeatInterval: 17500, - heartbeatTimeout: 15000, - npmFayeOptions: {}, - // These options are only for testing. - reloadWithOutstanding: false, - supportedDDPVersions: DDPCommon.SUPPORTED_DDP_VERSIONS, - retry: true, - respondToPings: true, - // When updates are coming within this ms interval, batch them together. - bufferedWritesInterval: 5, - // Flush buffers immediately if writes are happening continuously for more than this many ms. - bufferedWritesMaxAge: 500 + options = { + onConnected() {}, + onDDPVersionNegotiationFailure(description) { + Meteor._debug(description); }, - options - ); + heartbeatInterval: 17500, + heartbeatTimeout: 15000, + npmFayeOptions: {}, + // These options are only for testing. + reloadWithOutstanding: false, + supportedDDPVersions: DDPCommon.SUPPORTED_DDP_VERSIONS, + retry: true, + respondToPings: true, + // When updates are coming within this ms interval, batch them together. + bufferedWritesInterval: 5, + // Flush buffers immediately if writes are happening continuously for more than this many ms. + bufferedWritesMaxAge: 500, + + ...options + }; // If set, called when we reconnect, queuing method calls _before_ the // existing outstanding ones. diff --git a/packages/ddp-client/server/server.js b/packages/ddp-client/server/server.js index dc3cf0bc63..d48c0b36a1 100644 --- a/packages/ddp-client/server/server.js +++ b/packages/ddp-client/server/server.js @@ -1,5 +1,5 @@ export { DDP, LivedataTest } from '../common/namespace'; if (false) { - import "./stream_client_nodejs"; + import './stream_client_nodejs'; }