Update src/format-currency.js

Moved all the vars to top.