My implementation of the JavaScript NAT.