Rohfosho/CosmosBrowserBackend — pull request #1 by audun- (2014-09-11 13:53:19+00:00)
Title: Proposed clean up

Enforced strict mode on all functions, cleaned up variable definitions so they reflect JS hoisting, removed global variable dependencies for unicodeToBinary, binaryToUnicode and router.post('/sms'), moved object creation from return statements to separate variable declarations, removed console.log statements and where appropriate I placed throw statements instead. I also moved sendIt from the global scope to the local scope of router.post('/sms'). There might something gained by moving that and a few other functions to a separate helper file just for cleanliness and only have this file be a logic script with calls to functions in other scripts.