Port cilantro/ui level CoffeeScript file to JavaScript

Prefer a `_.map` instead?