Skip to content

Instantly share code, notes, and snippets.

@stenno
Created July 7, 2019 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenno/67e4aeac763c353e925c06d0a6a2faf8 to your computer and use it in GitHub Desktop.
Save stenno/67e4aeac763c353e925c06d0a6a2faf8 to your computer and use it in GitHub Desktop.
vowelratio golf
n=>(g=(a,b)=>b?g(b,a%b):a,[c=(n.match(/[b-df-hj-np-tv-z]/gi)||[]).length,v=(n.match(/[aeiou]/gi)||[]).length],`${c==0?1:v/g(v,c)}:${v==0?1:c/g(v,c)}`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment