From df474ce9454ef221c21c6eb2cbdf2bd2324c900b Mon Sep 17 00:00:00 2001 From: Washington Soares Date: Fri, 16 Dec 2016 16:31:28 -0200 Subject: [PATCH] refatorando ordem das bandeiras --- dist/creditcard.js | 6 +++--- dist/creditcard.min.js | 2 +- src/creditCardList.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/creditcard.js b/dist/creditcard.js index 60e4758..7a883ca 100644 --- a/dist/creditcard.js +++ b/dist/creditcard.js @@ -104,6 +104,9 @@ var CREDIT_CARD_LIST = [{ }, { name: 'Amex', regexpFull: '^3[47][0-9]{13}$' +}, { + name: 'Maestro', + regexpFull: '^(5018|5020|5038|6304|6759|6761|6763)[0-9]{8,15}$' }, { name: 'Aura', regexpFull: '^50[0-9]{14,17}$' @@ -116,9 +119,6 @@ var CREDIT_CARD_LIST = [{ }, { name: 'Visa', regexpFull: '^4[0-9]{12}(?:[0-9]{3})?$' -}, { - name: 'Maestro', - regexpFull: '^(50|56|57|58|59|60|61|62|63|64|65|66|67|68|69)\\d{12,19}$' }]; var CreditCardList = function () { diff --git a/dist/creditcard.min.js b/dist/creditcard.min.js index 4029a17..01a9741 100644 --- a/dist/creditcard.min.js +++ b/dist/creditcard.min.js @@ -4,4 +4,4 @@ * * Licensed MIT. */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.CreditCard=e()}}(function(){var e,r,n;return function e(r,n,t){function i(a,o){if(!n[a]){if(!r[a]){var l="function"==typeof require&&require;if(!o&&l)return l(a,!0);if(u)return u(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=n[a]={exports:{}};r[a][0].call(s.exports,function(e){var n=r[a][1][e];return i(n?n:e)},s,s.exports,e,r,n,t)}return n[a].exports}for(var u="function"==typeof require&&require,a=0;a12)&&!(i<1e3||i>=3e3))}}]),e}();r.exports=o},{"./creditCardList":2,"./helpers/luhn":3}],2:[function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,r){for(var n=0;n0&&i%10===0}}]),e}();r.exports=u},{}]},{},[1])(1)}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.CreditCard=e()}}(function(){var e,r,n;return function e(r,n,t){function i(a,o){if(!n[a]){if(!r[a]){var l="function"==typeof require&&require;if(!o&&l)return l(a,!0);if(u)return u(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=n[a]={exports:{}};r[a][0].call(s.exports,function(e){var n=r[a][1][e];return i(n?n:e)},s,s.exports,e,r,n,t)}return n[a].exports}for(var u="function"==typeof require&&require,a=0;a12)&&!(i<1e3||i>=3e3))}}]),e}();r.exports=o},{"./creditCardList":2,"./helpers/luhn":3}],2:[function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,r){for(var n=0;n0&&i%10===0}}]),e}();r.exports=u},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/src/creditCardList.js b/src/creditCardList.js index 362c79a..2c19291 100644 --- a/src/creditCardList.js +++ b/src/creditCardList.js @@ -14,6 +14,9 @@ const CREDIT_CARD_LIST = [ }, { name: 'Amex', regexpFull: '^3[47][0-9]{13}$' + }, { + name: 'Maestro', + regexpFull: '^(5018|5020|5038|6304|6759|6761|6763)[0-9]{8,15}$' }, { name: 'Aura', regexpFull: '^50[0-9]{14,17}$' @@ -26,9 +29,6 @@ const CREDIT_CARD_LIST = [ }, { name: 'Visa', regexpFull: '^4[0-9]{12}(?:[0-9]{3})?$' - }, { - name: 'Maestro', - regexpFull: '^(50|56|57|58|59|60|61|62|63|64|65|66|67|68|69)\\d{12,19}$' } ];