Update stringformat.js

Made it simpler: instead of having a function that constructs the function it will automatically export itself.
Merge pull request #1 from qgustavor/patch-1

Exporting as node module, if exports symbol is available. (thanks qguostavor)