realadvisor / rifm

React Input Format & Mask, tiny (≈800b) component to transform any input component into formatted or masked input. Supports number, date, phone, currency, credit card, etc
https://realadvisor.github.io/rifm/
MIT License
1.3k stars 44 forks source link

add credit card format example #22

Open hartzis opened 6 years ago

hartzis commented 6 years ago

Love the simple focus and straightforwardness of this library!

Thoughts on adding a credit card format example in format.js?

Found some code from cleave.js for formatting for credit cards as a reference. https://github.com/nosir/cleave.js/blob/master/src/shortcuts/CreditCardDetector.js

istarkov commented 6 years ago

I think to create standalone library with different universal formatters, possibly will add there I think.