Update for suggestions made at typpo/textbelt pull request #94
This commit is contained in:
parent
60b4b8d6ec
commit
7f8c2feb51
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user