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

@utils-fns/validators

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@utils-fns/validators - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

dist/cjs/types/lib/contracts/paymentCardValidator/index.d.ts

2

dist/cjs/types/index.d.ts

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

export { default as validators } from './lib/index';
export { default as validators, TypesValidators } from './lib/index';
//# sourceMappingURL=index.d.ts.map
export * from './email';
export * from './phone';
export * from './paymentCardValidator';
//# sourceMappingURL=index.d.ts.map

@@ -1,10 +0,23 @@

export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index';
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index';
export type TypesValidators = {
EmailValidator: EmailValidator;
MinMaxParamsEmail: MinMaxParamsEmail;
ParamsValidatorEmail: ParamsValidatorEmail;
PhoneValidator: PhoneValidator;
ParamsPhoneValidator: ParamsPhoneValidator;
CustomPatternPhone: CustomPatternPhone;
BrandCard: BrandCard;
ParamsPaymentCardValidator: ParamsPaymentCardValidator;
PaymentCardValidator: PaymentCardValidator;
TypeCard: TypeCard;
};
declare const validators: {
cpf: (cpf?: string | undefined) => boolean;
cnpj: (cnpj?: string | undefined) => boolean;
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean;
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean;
nis: (nis?: string | undefined) => boolean;
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean;
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean;
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean;
};
export default validators;
//# sourceMappingURL=index.d.ts.map

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

export { default as validators } from './lib/index';
export { default as validators, TypesValidators } from './lib/index';
//# sourceMappingURL=index.d.ts.map
export * from './email';
export * from './phone';
export * from './paymentCardValidator';
//# sourceMappingURL=index.d.ts.map

@@ -1,10 +0,23 @@

export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index';
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index';
export type TypesValidators = {
EmailValidator: EmailValidator;
MinMaxParamsEmail: MinMaxParamsEmail;
ParamsValidatorEmail: ParamsValidatorEmail;
PhoneValidator: PhoneValidator;
ParamsPhoneValidator: ParamsPhoneValidator;
CustomPatternPhone: CustomPatternPhone;
BrandCard: BrandCard;
ParamsPaymentCardValidator: ParamsPaymentCardValidator;
PaymentCardValidator: PaymentCardValidator;
TypeCard: TypeCard;
};
declare const validators: {
cpf: (cpf?: string | undefined) => boolean;
cnpj: (cnpj?: string | undefined) => boolean;
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean;
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean;
nis: (nis?: string | undefined) => boolean;
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean;
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean;
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean;
};
export default validators;
//# sourceMappingURL=index.d.ts.map

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

import { TypesUtils } from '@utils-fns/utils';
type MinMaxParamsEmail = {
min?: number;
max?: number;
};
type ParamsValidatorEmail = {
minMaxUserNameEmail?: MinMaxParamsEmail;
minMaxEmailDomain?: MinMaxParamsEmail;
emailDomainName?: RegExp;
};
type EmailValidator = {
email?: string;
paramsEmailValidator?: ParamsValidatorEmail;
};
type CustomPatternPhone = {

@@ -18,16 +34,26 @@ coutryCode: RegExp;

type MinMaxParamsEmail = {
min?: number;
max?: number;
type TypeCard = 'credit' | 'debit' | 'credit-debit';
type BrandCard = TypesUtils['BrandCardType'];
type ParamsPaymentCardValidator = {
validationTypeCard?: TypeCard;
specificBrandCard?: BrandCard;
customPatternPaymentCard?: RegExp;
};
type ParamsValidatorEmail = {
minMaxUserNameEmail?: MinMaxParamsEmail;
minMaxEmailDomain?: MinMaxParamsEmail;
emailDomainName?: RegExp;
type PaymentCardValidator = {
cardNumber?: string;
paramsPaymentCardValidator?: ParamsPaymentCardValidator;
};
type EmailValidator = {
email?: string;
paramsEmailValidator?: ParamsValidatorEmail;
type TypesValidators = {
EmailValidator: EmailValidator;
MinMaxParamsEmail: MinMaxParamsEmail;
ParamsValidatorEmail: ParamsValidatorEmail;
PhoneValidator: PhoneValidator;
ParamsPhoneValidator: ParamsPhoneValidator;
CustomPatternPhone: CustomPatternPhone;
BrandCard: BrandCard;
ParamsPaymentCardValidator: ParamsPaymentCardValidator;
PaymentCardValidator: PaymentCardValidator;
TypeCard: TypeCard;
};
declare const validators: {

@@ -39,5 +65,5 @@ cpf: (cpf?: string | undefined) => boolean;

phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean;
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean;
};
//# sourceMappingURL=index.d.ts.map
export { validators };
export { TypesValidators, validators };

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

export { default as validators } from './lib/index';
export { default as validators, TypesValidators } from './lib/index';
//# sourceMappingURL=index.d.ts.map
export * from './email';
export * from './phone';
export * from './paymentCardValidator';
//# sourceMappingURL=index.d.ts.map

@@ -1,10 +0,23 @@

export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index';
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index';
export type TypesValidators = {
EmailValidator: EmailValidator;
MinMaxParamsEmail: MinMaxParamsEmail;
ParamsValidatorEmail: ParamsValidatorEmail;
PhoneValidator: PhoneValidator;
ParamsPhoneValidator: ParamsPhoneValidator;
CustomPatternPhone: CustomPatternPhone;
BrandCard: BrandCard;
ParamsPaymentCardValidator: ParamsPaymentCardValidator;
PaymentCardValidator: PaymentCardValidator;
TypeCard: TypeCard;
};
declare const validators: {
cpf: (cpf?: string | undefined) => boolean;
cnpj: (cnpj?: string | undefined) => boolean;
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean;
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean;
nis: (nis?: string | undefined) => boolean;
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean;
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean;
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean;
};
export default validators;
//# sourceMappingURL=index.d.ts.map
{
"name": "@utils-fns/validators",
"version": "2.0.1",
"version": "2.1.0",
"main": "dist/cjs/index.ts",

@@ -22,2 +22,3 @@ "module": "dist/esm/index.ts",

"@caiocezarqueiroz/eslint-config": "^1.0.20",
"@utils-fns/utils": "*",
"@rollup/plugin-commonjs": "^25.0.0",

@@ -24,0 +25,0 @@ "@rollup/plugin-json": "^6.0.0",

@@ -19,3 +19,3 @@ # @utils-fns/validators

- [x] **phoneValidator**
- [ ] **creditcardValidator (luhn algorithm)**
- [ ] **paymentCardValidator (luhn algorithm)**
- [ ] **paymentSlipValidator (ITF-14)**

@@ -22,0 +22,0 @@ - [ ] **stateRegistrationValidator (inscrição estadual - BR)**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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