Created
October 5, 2020 12:45
-
-
Save olanipekunife/73dca4d0b382277662d1d0d97904d7b7 to your computer and use it in GitHub Desktop.
africa's talking implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!!data.text){ | |
const chkTxt= data.text.split('**') | |
if(chkTxt.length > 1){ | |
//skip the last | |
for(let i = 0;i<=chkTxt.length -2;i++){ | |
const holdNew = [...chkTxt[i].split('*')] | |
holdNew.pop() | |
chkTxt[i] = holdNew.join('*') | |
} | |
data.text= chkTxt.join('') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment