helper.js
321 Bytes
export function wrapperName(name) {
if (!name) {
return ''
}
var nL = name.length;
var newName = [];
if (nL > 5) {
newName.push(name[0])
newName.push(name[1])
newName.push('*')
newName.push('*')
newName.push(name[nL - 1])
return newName.join('')
} else {
return name;
}
}