Socket
Socket
Sign inDemoInstall

@types/validator

Package Overview
Dependencies
0
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.0.1 to 13.0.0

validator/lib/isBtcAddress.d.ts

64

validator/index.d.ts

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

// Type definitions for validator.js 12.0
// Type definitions for validator.js 13.0
// Project: https://github.com/validatorjs/validator.js

@@ -13,2 +13,3 @@ // Definitions by: tgfjt <https://github.com/tgfjt>

// Munif Tanjim <https://github.com/MunifTanjim>
// Vlad Poluch <https://github.com/vlapo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -196,2 +197,7 @@ // TypeScript Version: 2.1

/**
* Check if a string is a IBAN (International Bank Account Number).
*/
function isIBAN(str: string): boolean;
/**
* Check if a string is a BIC (Bank Identification Code) or SWIFT code.

@@ -302,2 +308,12 @@ */

/**
* Check if the string is an [Ethereum](https://ethereum.org/) address using basic regex. Does not validate address checksums.
*/
function isEthereumAddress(str: string): boolean;
/**
* Check if the string is a valid BTC address.
*/
function isBtcAddress(str: string): boolean;
/**
* Check if the string is a [data uri format](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs).

@@ -559,2 +575,15 @@ */

/**
* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification.
* Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)).
*/
function isHSL(str: string): boolean;
/**
* Check if the string is a rgb or rgba color.
*
* @param [includePercentValues=true] - If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false. (defaults to true)
*/
function isRgbColor(str: string, includePercentValues?: boolean): boolean;
type IdentityCardLocale = 'ES' | 'he-IL' | 'zh-TW';

@@ -607,2 +636,4 @@

type IPVersion = '4' | '6' | 4 | 6;
/**

@@ -613,3 +644,3 @@ * Check if the string is an IP (version 4 or 6).

*/
function isIP(str: string, version?: '4' | '6'): boolean;
function isIP(str: string, version?: IPVersion): boolean;

@@ -621,2 +652,4 @@ /**

type ISBNVersion = '10' | '13' | 10 | 13;
/**

@@ -627,5 +660,10 @@ * Check if the string is an ISBN (version 10 or 13).

*/
function isISBN(str: string, version?: '10' | '13'): boolean;
function isISBN(str: string, version?: ISBNVersion): boolean;
/**
* Check if the string is an EAN (European Article Number).
*/
function isEAN(str: string): boolean;
/**
* Check if the string is an [ISIN](https://en.wikipedia.org/wiki/International_Securities_Identification_Number) (stock/security identifier).

@@ -730,2 +768,7 @@ */

/**
* Check if the string is a locale.
*/
function isLocale(str: string): boolean;
/**
* Check if the string is lowercase.

@@ -912,2 +955,9 @@ */

/**
* Check if the string is a valid passport number relative to a specific country code.
*
* @param [countryCode] - Country code
*/
function isPassportNumber(str: string, countryCode?: string): boolean;
/**
* Check if the string is a valid port number.

@@ -981,2 +1031,7 @@ */

/**
* Check if the string is a Semantic Versioning Specification (SemVer).
*/
function isSemVer(str: string): boolean;
/**
* Check if the string contains any surrogate pairs chars.

@@ -1045,2 +1100,3 @@ */

type UUIDVersion = 3 | 4 | 5 | '3' | '4' | '5' | 'all';
/**

@@ -1051,3 +1107,3 @@ * Check if the string is a UUID (version 3, 4 or 5).

*/
function isUUID(str: string, version?: 3 | 4 | 5 | '3' | '4' | '5' | 'all'): boolean;
function isUUID(str: string, version?: UUIDVersion): boolean;

@@ -1054,0 +1110,0 @@ /**

import validator from '../';
export type AlphaLocale = validator.AlphaLocale;
export default validator.isAlpha;
import validator from '../';
export type AlphanumericLocale = validator.AlphanumericLocale;
export default validator.isAlphanumeric;
import validator from '../';
export type IsByteLengthOptions = validator.IsByteLengthOptions;
export default validator.isByteLength;
import validator from '../';
export type IsCurrencyOptions = validator.IsCurrencyOptions;
export default validator.isCurrency;
import validator from '../';
export type IsDecimalOptions = validator.IsDecimalOptions;
export type DecimalLocale = validator.DecimalLocale;
export default validator.isDecimal;
import validator from '../';
export type IsEmailOptions = validator.IsEmailOptions;
export default validator.isEmail;
import validator from '../';
export type IsEmptyOptions = validator.IsEmptyOptions;
export default validator.isEmpty;
import validator from '../';
export type FloatLocale = validator.FloatLocale;
export type IsFloatOptions = validator.IsFloatOptions;
export default validator.isFloat;
import validator from '../';
export type IsFQDNOptions = validator.IsFQDNOptions;
export default validator.isFQDN;
import validator from '../';
export type HashAlgorithm = validator.HashAlgorithm;
export default validator.isHash;
import validator from '../';
export type IdentityCardLocale = validator.IdentityCardLocale;
export default validator.isIdentityCard;
import validator from '../';
export type IsIntOptions = validator.IsIntOptions;
export default validator.isInt;
import validator from '../';
export type IPVersion = validator.IPVersion;
export default validator.isIP;
import validator from '../';
export type ISBNVersion = validator.ISBNVersion;
export default validator.isISBN;
import validator from '../';
export type IsISO8601Options = validator.IsISO8601Options;
export default validator.isISO8601;
import validator from '../';
export type IsISSNOptions = validator.IsISSNOptions;
export default validator.isISSN;
import validator from '../';
export type IsLengthOptions = validator.IsLengthOptions;
export default validator.isLength;
import validator from '../';
export type IsMACAddressOptions = validator.IsMACAddressOptions;
export default validator.isMACAddress;
import validator from '../';
export type MobilePhoneLocale = validator.MobilePhoneLocale;
export type IsMobilePhoneOptions = validator.IsMobilePhoneOptions;
export default validator.isMobilePhone;
import validator from '../';
export type IsNumericOptions = validator.IsNumericOptions;
export default validator.isNumeric;
import validator from '../';
export type PostalCodeLocale = validator.PostalCodeLocale;
export default validator.isPostalCode;
import validator from '../';
export type IsURLOptions = validator.IsURLOptions;
export default validator.isURL;
import validator from '../';
export type UUIDVersion = validator.UUIDVersion;
export default validator.isUUID;
import validator from '../';
export type NormalizeEmailOptions = validator.NormalizeEmailOptions;
export default validator.normalizeEmail;

9

validator/package.json
{
"name": "@types/validator",
"version": "12.0.1",
"version": "13.0.0",
"description": "TypeScript definitions for validator.js",

@@ -56,2 +56,7 @@ "license": "MIT",

"githubUsername": "MunifTanjim"
},
{
"name": "Vlad Poluch",
"url": "https://github.com/vlapo",
"githubUsername": "vlapo"
}

@@ -68,4 +73,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "12107961dad1214dbf82eb5432aa655cfa756ceee20d82f93ae05b5cb3999f77",
"typesPublisherContentHash": "209550b08682e6342ae12050e167193d497d847b62448cedf8887f4bfce2b1a7",
"typeScriptVersion": "2.8"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 25 Nov 2019 22:05:22 GMT
* Last updated: Tue, 07 Apr 2020 20:54:46 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by tgfjt (https://github.com/tgfjt), Ilya Mochalov (https://github.com/chrootsu), Ayman Nedjmeddine (https://github.com/IOAyman), Louay Alakkad (https://github.com/louy), Kacper Polak (https://github.com/kacepe), Bonggyun Lee (https://github.com/deptno), Naoto Yokoyama (https://github.com/builtinnya), Philipp Katz (https://github.com/qqilihq), Jace Warren (https://github.com/keatz55), and Munif Tanjim (https://github.com/MunifTanjim).
These definitions were written by [tgfjt](https://github.com/tgfjt), [Ilya Mochalov](https://github.com/chrootsu), [Ayman Nedjmeddine](https://github.com/IOAyman), [Louay Alakkad](https://github.com/louy), [Kacper Polak](https://github.com/kacepe), [Bonggyun Lee](https://github.com/deptno), [Naoto Yokoyama](https://github.com/builtinnya), [Philipp Katz](https://github.com/qqilihq), [Jace Warren](https://github.com/keatz55), [Munif Tanjim](https://github.com/MunifTanjim), and [Vlad Poluch](https://github.com/vlapo).
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc