Update for suggestions made at typpo/textbelt pull request #94
This commit is contained in:
		@@ -75,15 +75,10 @@ function sendText(phone, message, carrier, region, cb) {
 | 
				
			|||||||
      obj - object of config properties to be overriden
 | 
					      obj - object of config properties to be overriden
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
function setConfig(obj) {
 | 
					function setConfig(obj) {
 | 
				
			||||||
  for (var prop in obj) {
 | 
					  config = Object.assign(config, obj);
 | 
				
			||||||
    if (obj.hasOwnProperty(prop)) {
 | 
					 | 
				
			||||||
      config[prop] = obj[prop];
 | 
					 | 
				
			||||||
    } 
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
  send:       sendText,     // Send a text message
 | 
					  send:       sendText,     // Send a text message
 | 
				
			||||||
  // debug:      debug,     No longer needed, see setConfig and config.js
 | 
					 | 
				
			||||||
  config:     setConfig     // Override default config
 | 
					  config:     setConfig     // Override default config
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user