Ad

less char -> Short-Circuiting instead of ternary

Code
Diff
  • v='aeiou'
    x=(s,f)=>[...s].map(f).join``
    d=s=>x(s,e=>v[Math.min(6,e)-1]||e)
    n=s=>x(s,e=>v.indexOf(e)+1||e)
    • v='aeiou'
    • x=(s,f)=>[...s].map(f).join``
    • d=s=>x(s,e=>(+e&&e<6?v[e-1]:e))
    • n=s=>x(s,e=>((g=v.indexOf(e)+1)&g?g:e))
    • d=s=>x(s,e=>v[Math.min(6,e)-1]||e)
    • n=s=>x(s,e=>v.indexOf(e)+1||e)