Update index.js

The code has been beautified to fit the node.js coding style guide. More importantly it does no longer leak the `show` variable.