Helpful JavaScript (in CoffeeScript)