3 ms·
I do sometimes go back and stare at this wonder I crafted once: s=>s[0]+/.*( .|z)|...s.s?|T..|M[i-t]+|[AFINOUW][^o]v?|.*/.exec(s)[0].slice(-1).toUpperCase()
by stevage 7y ago
I do sometimes go back and stare at this wonder I crafted once:
s=>s[0]+/.*( .|z)|...s.s?|T..|M[i-t]+|[AFINOUW][^o]v?|.*/.exec(s)[0].slice(-1).toUpperCase()
It does something pretty useful, that has surely been written many times over. But unlikely ever as succinctly as this. :)
- plibither8 7y agoAlright, I'll bite - what does it do?