card-validator
Advanced tools
Comparing version 7.0.1 to 7.1.0
@@ -0,1 +1,5 @@ | ||
# 7.1.0 | ||
- The cardValidator object is now available as the `default` import when using es modules (thanks @leomp12) | ||
# 7.0.1 | ||
@@ -2,0 +6,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cardNumber = void 0; | ||
var luhn10 = require("./luhn-10"); | ||
@@ -4,0 +5,0 @@ var getCardTypes = require("credit-card-type"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cvv = void 0; | ||
var DEFAULT_LENGTH = 3; | ||
@@ -4,0 +5,0 @@ function includes(array, thing) { |
@@ -14,2 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.expirationDate = void 0; | ||
var parse_date_1 = require("./lib/parse-date"); | ||
@@ -16,0 +17,0 @@ var expiration_month_1 = require("./expiration-month"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.expirationMonth = void 0; | ||
function verification(isValid, isPotentiallyValid, isValidForThisYear) { | ||
@@ -4,0 +5,0 @@ return { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.expirationYear = void 0; | ||
var DEFAULT_VALID_NUMBER_OF_YEARS_IN_THE_FUTURE = 19; | ||
@@ -4,0 +5,0 @@ function verification(isValid, isPotentiallyValid, isCurrentYear) { |
import * as creditCardType from "credit-card-type"; | ||
export { cardNumber as number } from "./card-number"; | ||
export { expirationDate } from "./expiration-date"; | ||
export { expirationMonth } from "./expiration-month"; | ||
export { expirationYear } from "./expiration-year"; | ||
export { cvv } from "./cvv"; | ||
export { postalCode } from "./postal-code"; | ||
export { creditCardType }; | ||
import { cardNumber as number } from "./card-number"; | ||
import { expirationDate } from "./expiration-date"; | ||
import { expirationMonth } from "./expiration-month"; | ||
import { expirationYear } from "./expiration-year"; | ||
import { cvv } from "./cvv"; | ||
import { postalCode } from "./postal-code"; | ||
declare const cardValidator: { | ||
creditCardType: typeof creditCardType; | ||
number: typeof number; | ||
expirationDate: typeof expirationDate; | ||
expirationMonth: typeof expirationMonth; | ||
expirationYear: typeof expirationYear; | ||
cvv: typeof cvv; | ||
postalCode: typeof postalCode; | ||
}; | ||
export default cardValidator; | ||
export { creditCardType, number, expirationDate, expirationMonth, expirationYear, cvv, postalCode, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.postalCode = exports.cvv = exports.expirationYear = exports.expirationMonth = exports.expirationDate = exports.number = exports.creditCardType = void 0; | ||
var creditCardType = require("credit-card-type"); | ||
exports.creditCardType = creditCardType; | ||
var card_number_1 = require("./card-number"); | ||
exports.number = card_number_1.cardNumber; | ||
Object.defineProperty(exports, "number", { enumerable: true, get: function () { return card_number_1.cardNumber; } }); | ||
var expiration_date_1 = require("./expiration-date"); | ||
exports.expirationDate = expiration_date_1.expirationDate; | ||
Object.defineProperty(exports, "expirationDate", { enumerable: true, get: function () { return expiration_date_1.expirationDate; } }); | ||
var expiration_month_1 = require("./expiration-month"); | ||
exports.expirationMonth = expiration_month_1.expirationMonth; | ||
Object.defineProperty(exports, "expirationMonth", { enumerable: true, get: function () { return expiration_month_1.expirationMonth; } }); | ||
var expiration_year_1 = require("./expiration-year"); | ||
exports.expirationYear = expiration_year_1.expirationYear; | ||
Object.defineProperty(exports, "expirationYear", { enumerable: true, get: function () { return expiration_year_1.expirationYear; } }); | ||
var cvv_1 = require("./cvv"); | ||
exports.cvv = cvv_1.cvv; | ||
Object.defineProperty(exports, "cvv", { enumerable: true, get: function () { return cvv_1.cvv; } }); | ||
var postal_code_1 = require("./postal-code"); | ||
exports.postalCode = postal_code_1.postalCode; | ||
Object.defineProperty(exports, "postalCode", { enumerable: true, get: function () { return postal_code_1.postalCode; } }); | ||
var cardValidator = { | ||
creditCardType: creditCardType, | ||
number: card_number_1.cardNumber, | ||
expirationDate: expiration_date_1.expirationDate, | ||
expirationMonth: expiration_month_1.expirationMonth, | ||
expirationYear: expiration_year_1.expirationYear, | ||
cvv: cvv_1.cvv, | ||
postalCode: postal_code_1.postalCode, | ||
}; | ||
exports.default = cardValidator; |
"use strict"; | ||
// Polyfill taken from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill>. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isArray = void 0; | ||
exports.isArray = Array.isArray || | ||
@@ -5,0 +6,0 @@ function (arg) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseDate = void 0; | ||
var expiration_year_1 = require("../expiration-year"); | ||
@@ -4,0 +5,0 @@ var is_array_1 = require("./is-array"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.postalCode = void 0; | ||
var DEFAULT_MIN_POSTAL_CODE_LENGTH = 3; | ||
@@ -4,0 +5,0 @@ function verification(isValid, isPotentiallyValid) { |
{ | ||
"name": "card-validator", | ||
"version": "7.0.1", | ||
"version": "7.1.0", | ||
"description": "A library for validating credit card fields", | ||
@@ -23,10 +23,10 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.11.1", | ||
"eslint": "^6.8.0", | ||
"@types/jest": "^26.0.4", | ||
"@types/node": "^14.0.23", | ||
"eslint": "^7.4.0", | ||
"eslint-config-braintree": "^5.0.0-typescript-prep-rc.17", | ||
"jest": "^25.3.0", | ||
"prettier": "^2.0.4", | ||
"ts-jest": "^25.3.1", | ||
"typescript": "^3.8.3" | ||
"jest": "^26.1.0", | ||
"prettier": "^2.0.5", | ||
"ts-jest": "^26.1.3", | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -33,0 +33,0 @@ "dependencies": { |
import * as creditCardType from "credit-card-type"; | ||
export { cardNumber as number } from "./card-number"; | ||
export { expirationDate } from "./expiration-date"; | ||
export { expirationMonth } from "./expiration-month"; | ||
export { expirationYear } from "./expiration-year"; | ||
export { cvv } from "./cvv"; | ||
export { postalCode } from "./postal-code"; | ||
import { cardNumber as number } from "./card-number"; | ||
import { expirationDate } from "./expiration-date"; | ||
import { expirationMonth } from "./expiration-month"; | ||
import { expirationYear } from "./expiration-year"; | ||
import { cvv } from "./cvv"; | ||
import { postalCode } from "./postal-code"; | ||
export { creditCardType }; | ||
const cardValidator = { | ||
creditCardType, | ||
number, | ||
expirationDate, | ||
expirationMonth, | ||
expirationYear, | ||
cvv, | ||
postalCode, | ||
}; | ||
export default cardValidator; | ||
export { | ||
creditCardType, | ||
number, | ||
expirationDate, | ||
expirationMonth, | ||
expirationYear, | ||
cvv, | ||
postalCode, | ||
}; |
113779
3329