Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

credit-card-type

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

credit-card-type - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

6.1.1
=====
- Correct Mastercard bin range for series 2 bins
6.1.0

@@ -2,0 +7,0 @@ =====

2

dist/js/app.built.js

@@ -57,3 +57,3 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.creditCardType=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

prefixPattern: /^(5|5[1-5]|2|22|222|222[1-9]|2[3-6]|27|27[0-2]|2720)$/,
exactPattern: /^(5[1-5]|222[1-9]|2[3-6]|27[0-1]|2720)\d*$/,
exactPattern: /^(5[1-5]|222[1-9]|22[3-9]|2[3-6]|27[0-1]|2720)\d*$/,
gaps: [4, 8, 12],

@@ -60,0 +60,0 @@ lengths: [16],

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.creditCardType=e()}}(function(){return function e(t,n,r){function i(s,p){if(!n[s]){if(!t[s]){var o="function"==typeof require&&require;if(!p&&o)return o(s,!0);if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";function r(e){var t;return e?(t=JSON.parse(JSON.stringify(e)),delete t.prefixPattern,delete t.exactPattern,t):null}function i(e){var t,n,i,s=[],p=[];if(!("string"==typeof e||e instanceof String))return[];for(i=0;i<m.length;i++)t=m[i],n=a[t],0!==e.length?n.exactPattern.test(e)?p.push(r(n)):n.prefixPattern.test(e)&&s.push(r(n)):s.push(r(n));return p.length?p:s}var a={},s="visa",p="master-card",o="american-express",f="diners-club",c="discover",d="jcb",u="unionpay",l="maestro",y="CVV",x="CID",g="CVC",P="CVN",m=[s,p,o,f,c,d,u,l];a[s]={niceType:"Visa",type:s,prefixPattern:/^4$/,exactPattern:/^4\d*$/,gaps:[4,8,12],lengths:[16,18,19],code:{name:y,size:3}},a[p]={niceType:"Mastercard",type:p,prefixPattern:/^(5|5[1-5]|2|22|222|222[1-9]|2[3-6]|27|27[0-2]|2720)$/,exactPattern:/^(5[1-5]|222[1-9]|2[3-6]|27[0-1]|2720)\d*$/,gaps:[4,8,12],lengths:[16],code:{name:g,size:3}},a[o]={niceType:"American Express",type:o,prefixPattern:/^(3|34|37)$/,exactPattern:/^3[47]\d*$/,isAmex:!0,gaps:[4,10],lengths:[15],code:{name:x,size:4}},a[f]={niceType:"Diners Club",type:f,prefixPattern:/^(3|3[0689]|30[0-5])$/,exactPattern:/^3(0[0-5]|[689])\d*$/,gaps:[4,10],lengths:[14,16,19],code:{name:y,size:3}},a[c]={niceType:"Discover",type:c,prefixPattern:/^(6|60|601|6011|65|64|64[4-9])$/,exactPattern:/^(6011|65|64[4-9])\d*$/,gaps:[4,8,12],lengths:[16,19],code:{name:x,size:3}},a[d]={niceType:"JCB",type:d,prefixPattern:/^(2|21|213|2131|1|18|180|1800|3|35)$/,exactPattern:/^(2131|1800|35)\d*$/,gaps:[4,8,12],lengths:[16,17,18,19],code:{name:y,size:3}},a[u]={niceType:"UnionPay",type:u,prefixPattern:/^((6|62|62\d|(621(?!83|88|98|99))|622(?!06)|627[02,06,07]|628(?!0|1)|629[1,2])|622018)$/,exactPattern:/^(((620|(621(?!83|88|98|99))|622(?!06|018)|62[3-6]|627[02,06,07]|628(?!0|1)|629[1,2]))\d*|622018\d{12})$/,gaps:[4,8,12],lengths:[16,17,18,19],code:{name:P,size:3}},a[l]={niceType:"Maestro",type:l,prefixPattern:/^(5|5[06-9]|6\d*)$/,exactPattern:/^(5[06-9]|6[37])\d*$/,gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:g,size:3}},i.getTypeInfo=function(e){return r(a[e])},i.types={VISA:s,MASTERCARD:p,AMERICAN_EXPRESS:o,DINERS_CLUB:f,DISCOVER:c,JCB:d,UNIONPAY:u,MAESTRO:l},t.exports=i},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.creditCardType=e()}}(function(){return function e(t,n,r){function i(s,p){if(!n[s]){if(!t[s]){var o="function"==typeof require&&require;if(!p&&o)return o(s,!0);if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";function r(e){var t;return e?(t=JSON.parse(JSON.stringify(e)),delete t.prefixPattern,delete t.exactPattern,t):null}function i(e){var t,n,i,s=[],p=[];if(!("string"==typeof e||e instanceof String))return[];for(i=0;i<m.length;i++)t=m[i],n=a[t],0!==e.length?n.exactPattern.test(e)?p.push(r(n)):n.prefixPattern.test(e)&&s.push(r(n)):s.push(r(n));return p.length?p:s}var a={},s="visa",p="master-card",o="american-express",f="diners-club",c="discover",d="jcb",u="unionpay",l="maestro",y="CVV",x="CID",g="CVC",P="CVN",m=[s,p,o,f,c,d,u,l];a[s]={niceType:"Visa",type:s,prefixPattern:/^4$/,exactPattern:/^4\d*$/,gaps:[4,8,12],lengths:[16,18,19],code:{name:y,size:3}},a[p]={niceType:"Mastercard",type:p,prefixPattern:/^(5|5[1-5]|2|22|222|222[1-9]|2[3-6]|27|27[0-2]|2720)$/,exactPattern:/^(5[1-5]|222[1-9]|22[3-9]|2[3-6]|27[0-1]|2720)\d*$/,gaps:[4,8,12],lengths:[16],code:{name:g,size:3}},a[o]={niceType:"American Express",type:o,prefixPattern:/^(3|34|37)$/,exactPattern:/^3[47]\d*$/,isAmex:!0,gaps:[4,10],lengths:[15],code:{name:x,size:4}},a[f]={niceType:"Diners Club",type:f,prefixPattern:/^(3|3[0689]|30[0-5])$/,exactPattern:/^3(0[0-5]|[689])\d*$/,gaps:[4,10],lengths:[14,16,19],code:{name:y,size:3}},a[c]={niceType:"Discover",type:c,prefixPattern:/^(6|60|601|6011|65|64|64[4-9])$/,exactPattern:/^(6011|65|64[4-9])\d*$/,gaps:[4,8,12],lengths:[16,19],code:{name:x,size:3}},a[d]={niceType:"JCB",type:d,prefixPattern:/^(2|21|213|2131|1|18|180|1800|3|35)$/,exactPattern:/^(2131|1800|35)\d*$/,gaps:[4,8,12],lengths:[16,17,18,19],code:{name:y,size:3}},a[u]={niceType:"UnionPay",type:u,prefixPattern:/^((6|62|62\d|(621(?!83|88|98|99))|622(?!06)|627[02,06,07]|628(?!0|1)|629[1,2])|622018)$/,exactPattern:/^(((620|(621(?!83|88|98|99))|622(?!06|018)|62[3-6]|627[02,06,07]|628(?!0|1)|629[1,2]))\d*|622018\d{12})$/,gaps:[4,8,12],lengths:[16,17,18,19],code:{name:P,size:3}},a[l]={niceType:"Maestro",type:l,prefixPattern:/^(5|5[06-9]|6\d*)$/,exactPattern:/^(5[06-9]|6[37])\d*$/,gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:g,size:3}},i.getTypeInfo=function(e){return r(a[e])},i.types={VISA:s,MASTERCARD:p,AMERICAN_EXPRESS:o,DINERS_CLUB:f,DISCOVER:c,JCB:d,UNIONPAY:u,MAESTRO:l},t.exports=i},{}]},{},[1])(1)});

@@ -56,3 +56,3 @@ 'use strict';

prefixPattern: /^(5|5[1-5]|2|22|222|222[1-9]|2[3-6]|27|27[0-2]|2720)$/,
exactPattern: /^(5[1-5]|222[1-9]|2[3-6]|27[0-1]|2720)\d*$/,
exactPattern: /^(5[1-5]|222[1-9]|22[3-9]|2[3-6]|27[0-1]|2720)\d*$/,
gaps: [4, 8, 12],

@@ -59,0 +59,0 @@ lengths: [16],

{
"name": "credit-card-type",
"version": "6.1.0",
"version": "6.1.1",
"description": "A library for determining credit card type",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc