react-currency-input icon indicating copy to clipboard operation
react-currency-input copied to clipboard

Export mask function

Open bazk opened this issue 6 years ago • 0 comments

I've stumbled upon a case in which the mask function is useful by itself.

What I needed was to generate a plain text output of a currency, but formatted exactly like in the input component (same precision, decimalSeparator, etc.). By exporting the mask function, I can just import that and call it with the same parameters as I did for the input component, and voilà: we have a formatted, plain text output.

bazk avatar Nov 01 '18 16:11 bazk