A port of Bunnie from Lua to Javascript