|
109 | 109 | 'prefixPattern' : /^4$/,
|
110 | 110 | 'exactPattern' : /^4\d*$/,
|
111 | 111 | 'gaps' : [4, 8, 12],
|
112 |
| - 'lengths' : [16], |
| 112 | + 'lengths' : [13, 16], |
113 | 113 | 'code' : {
|
114 | 114 | 'name' : 'CVV',
|
115 | 115 | 'size' : 3
|
|
129 | 129 | }
|
130 | 130 | });
|
131 | 131 |
|
| 132 | + types.push({ |
| 133 | + 'niceType' : 'Diners Club', |
| 134 | + 'type' : 3, |
| 135 | + 'prefixPattern' : /^(36|38|30[0-5])$/, |
| 136 | + 'exactPattern' : /^(36|38|30[0-5])\d*$/, |
| 137 | + 'gaps' : [4, 8, 12], |
| 138 | + 'lengths' : [14, 16], |
| 139 | + 'code' : { |
| 140 | + 'name' : 'CVV', |
| 141 | + 'size' : 3 |
| 142 | + } |
| 143 | + }); |
| 144 | + |
| 145 | + types.push({ |
| 146 | + 'niceType' : 'Elo', |
| 147 | + 'type' : 4, |
| 148 | + 'prefixPattern' : /^(636368|636369|438935|504175|451416|636297|5067|4576|4011|506699)$/, |
| 149 | + 'exactPattern' : /^(636368|636369|438935|504175|451416|636297|5067|4576|4011|506699)\d*$/, |
| 150 | + 'gaps' : [4, 8, 12], |
| 151 | + 'lengths' : [16], |
| 152 | + 'code' : { |
| 153 | + 'name' : 'CVV', |
| 154 | + 'size' : 3 |
| 155 | + } |
| 156 | + }); |
| 157 | + |
132 | 158 | function luhn10(identifier) {
|
133 | 159 | var sum = 0;
|
134 | 160 | var alt = false;
|
|
655 | 681 | }
|
656 | 682 |
|
657 | 683 | }());
|
| 684 | +(function() { |
| 685 | + 'use strict'; |
| 686 | + |
| 687 | + angular |
| 688 | + .module('plingUiLite') |
| 689 | + .service('cacheService', CachingService); |
| 690 | + |
| 691 | + CachingService.$inject = [ '$templateCache', '$route', '$http' ]; |
| 692 | + |
| 693 | + function CachingService($templateCache, $route, $http) { |
| 694 | + |
| 695 | + |
| 696 | + this.cacheViews = function (cacheObj, routeObj) { |
| 697 | + |
| 698 | + // setting defaults |
| 699 | + var |
| 700 | + partial, route, |
| 701 | + viewCache = cacheObj || $templateCache, |
| 702 | + router = routeObj || $route; |
| 703 | + |
| 704 | + // looping routes |
| 705 | + for (route in router.routes) { |
| 706 | + |
| 707 | + if (router.routes.hasOwnProperty(route)) { |
| 708 | + |
| 709 | + // evaluate partial |
| 710 | + partial = router.routes[route].templateUrl; |
| 711 | + |
| 712 | + if (partial) |
| 713 | + // caching route |
| 714 | + $http.get(partial, {'cache': viewCache}); |
| 715 | + } |
| 716 | + } |
| 717 | + }; |
| 718 | + } |
| 719 | + |
| 720 | +}()); |
| 721 | + |
658 | 722 | (function (context, logger) {
|
659 | 723 | 'use strict';
|
660 | 724 |
|
|
916 | 980 | // creating instance
|
917 | 981 | context.loader = new ConfLoader();
|
918 | 982 | }(window.pling));
|
919 |
| -(function() { |
920 |
| - 'use strict'; |
921 |
| - |
922 |
| - angular |
923 |
| - .module('plingUiLite') |
924 |
| - .service('cacheService', CachingService); |
925 |
| - |
926 |
| - CachingService.$inject = [ '$templateCache', '$route', '$http' ]; |
927 |
| - |
928 |
| - function CachingService($templateCache, $route, $http) { |
929 |
| - |
930 |
| - |
931 |
| - this.cacheViews = function (cacheObj, routeObj) { |
932 |
| - |
933 |
| - // setting defaults |
934 |
| - var |
935 |
| - partial, route, |
936 |
| - viewCache = cacheObj || $templateCache, |
937 |
| - router = routeObj || $route; |
938 |
| - |
939 |
| - // looping routes |
940 |
| - for (route in router.routes) { |
941 |
| - |
942 |
| - if (router.routes.hasOwnProperty(route)) { |
943 |
| - |
944 |
| - // evaluate partial |
945 |
| - partial = router.routes[route].templateUrl; |
946 |
| - |
947 |
| - if (partial) |
948 |
| - // caching route |
949 |
| - $http.get(partial, {'cache': viewCache}); |
950 |
| - } |
951 |
| - } |
952 |
| - }; |
953 |
| - } |
954 |
| - |
955 |
| -}()); |
956 |
| - |
957 | 983 | (function() {
|
958 | 984 | 'use strict';
|
959 | 985 |
|
|
0 commit comments