UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

2 lines (1 loc) 202 B
function t(e,r=",",n=!1){let l;if(0===e.length)return"";n&&(e=Array.from(new Set(e)));let o=e.length,f="";for(let t=0;t<o-1;t++)(l=e[t])&&(f+=l,f+=r);return(l=e[o-1])&&(f+=l),f}export{t as stringJoin};