I wrote a small JS library to do something useful, but I'm convinced that I'm doing something stupid with my code that makes me look amateurish. Would anyone be willing to give my code a look before i try and post it on HN? It's quite short and simple.