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
|
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
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user