Skip to content

Instantly share code, notes, and snippets.

@rafaelcavalcante
Created September 13, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelcavalcante/a9b25a828ed001db36a97c2af3e18dc0 to your computer and use it in GitHub Desktop.
Save rafaelcavalcante/a9b25a828ed001db36a97c2af3e18dc0 to your computer and use it in GitHub Desktop.
elocc/helpers
const helpers = {
toCurrency: (value) => value.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' }),
parseIsoDate: (value) => Date.parse(value).toLocaleDateString('pt-BR', { day: 'numeric', month: 'long', year: 'numeric' })
};
export default helpers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment