Vue replaces the numbers in the string *

Rethinking again in the development, in order to prevent the transaction from intermittent calls in the remarks to cause fraud, do a need for automatic replacement of numbers in the note *

There are not many words, the upper code

let output = [];

Let text = “123456 Hello 123 Hello 123”

for (let i = 0, Ilen = text .length; i <ilen; i ++) {
IF (Text [i] .match (/ \ d /)) {
output.push(‘*’);
} else {
Output.push (Text [i]);
}
}
Text = Output.join (”)

// Output ***** Hello *** Hello ***