So basically i just published my first npm package.
It is a Vue component that displays a reactive credit card preview for payment forms.
You can download it from NPM or see the code in the Github repo.
What you think about it?
Please leave your suggestions in the comments.
I hope you guys like it!
Top comments (9)
Very nice Hildor!
But I think, you need to refactor your code.
For example:
It's mystic numbers that can't give any description. I hope you won't stop and will continue developing your pretty component!
Thanks for replying, so in this case what do you suggest? Maybe assigning the array to a "const brandNumbers"?
I can recommend you to create
@/constants.js
and import it.In the future, it will help you to scale your component.
Right, great idea, i will be implementing this soon!
Thanks, Alexandr.
Feel free to contact me.
I'm interested to write the same component for my own project. :)
You didn't share any link to the package. How can we install it?
lol, you are right, i didn't even notice, thanks, i put the link in the post.
so cvc is 4 numbers ?
yes, usually is 3 or 4 depending on the card brand.