Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / forms / deps / isValidCreditCard.d.ts
Size: Mime:
declare type CreditCardDataType = string | number;
export declare type AnyMatchList = RegExp[] | ReadonlyArray<RegExp> | RegExp;
declare const isAmexCard: any;
/**
 * @todo isWesternUnion
 */
declare const masterCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: RegExp;
    is: any;
    icon: string;
}>;
declare const visaCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: RegExp;
    is: any;
    icon: string;
}>;
declare const amexCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: RegExp;
    is: any;
    icon: string;
}>;
declare const discoverCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    is: (value: any) => any;
    match: ReadonlyArray<RegExp>;
    icon: string;
}>;
declare const dinnerClubCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: ReadonlyArray<RegExp>;
    is: (value: any) => any;
    icon: string;
}>;
declare const invalidCard: Readonly<{
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: RegExp;
    is: (card: any) => boolean;
    icon: string;
}>;
export interface CreditCardType {
    owns: string;
    cardLength: number;
    cvcLength: number;
    match: string;
    is: (...args: any) => boolean;
    icon: string;
    value?: string;
}
declare function toCreditCard(value: CreditCardDataType): CreditCardType;
/**
 * @note - this always returns a boolean, to coerce to credit card, use it
 * if you benchmark and need perf boost, add cache or safety to `toInvalidCard`
 *
 * @param {String} value
 * @return {Boolean}
 */
declare function isValidCreditCard(value: string): boolean;
declare function isValidSecurityCode(value: CreditCardDataType): boolean;
export { masterCard };
export { visaCard };
export { amexCard };
export { isAmexCard };
export { discoverCard };
export { dinnerClubCard };
export { invalidCard };
export { toCreditCard };
export { isValidCreditCard };
export { isValidSecurityCode };
export default isValidCreditCard;