From 7f8c2feb51a11325302c268432a4427e87958c59 Mon Sep 17 00:00:00 2001 From: Timothy Willard Date: Fri, 2 Dec 2016 21:20:40 -0500 Subject: [PATCH] Update for suggestions made at typpo/textbelt pull request #94 --- lib/text.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/text.js b/lib/text.js index 70de701..a22334a 100644 --- a/lib/text.js +++ b/lib/text.js @@ -75,15 +75,10 @@ function sendText(phone, message, carrier, region, cb) { obj - object of config properties to be overriden */ function setConfig(obj) { - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - config[prop] = obj[prop]; - } - } + config = Object.assign(config, obj); } module.exports = { send: sendText, // Send a text message - // debug: debug, No longer needed, see setConfig and config.js config: setConfig // Override default config };