return tmp[len].replace(/{name}/g, (item, i) : string =>
export const likes = (a: string[]) : string => {
let len: number;
let tmp: string[] = [
"no one",
"{name}",
"{name}, {name}",
"{name}, {name}, {name} ",
"{name}, {name} and others"
]
a.length > 3 ? len = 4 : len = a.length;
console.log(tmp[len]);
return tmp[len].replace(/{name})/g, (item, i) : string => {
if(item == '{name}') return a[i];
})
}