//import libraryconstonfon=require('onfonsms');//get data from database or ...constUsername='xxxx';// onfon client usernameconstPassword='xxxx';// onfon client passwordconstPhoneNumber='254xxxxxxxxx';// to mobile number or recipient numberconstMessage='npm test super agent';// sms text messageconstSenderId='YYYYY';// You can use your project or company nameconstSmsId=Math.random().toString(36).replace('0.','');constobj={username: Username,password: Password,senderid: SenderId,smsid: SmsId,recipient: PhoneNumber,message: Message};//send smsnewPromise((resolve,reject)=>{onfon(obj).then(res=>{resolve(true);}).catch(err=>{console.log('error: ',err);reject(err);});});