Closed kindofone closed 9 years ago
File this in bendrucker/creditcards where it's actually coming from and we can have a look. Notice that it's written in standard style and I don't intend to change that. PR would be much appreciated here because this issue does not affect me.
Hey Ben,
The following line breaks the script when this file goes through minification: https://github.com/bendrucker/angular-credit-cards/blob/master/release/angular-credit-cards.js#L273
After minification it looks life this:
var cvcRegex=/^\d{3,4}$/exports.isValid=function(cvc,type){if(typeof cvc!=='string')return false
And browser console says:
Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'exports'
It could be solved by adding semi-colon ; at the end of the line or by wrapping the regex so it won't break.