Fix: codes variable is leaked to global scope

If I use this module along with mocha in my own module, running mocha will generate this error:

Error: global leak detected: codes.