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 };