mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Add isJWT type def for validator package (#34283)
* adds isJWT type def for validator * Increases the version number in the header
This commit is contained in:
Vendored
+10
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for validator.js v10.9.0
|
||||
// Type definitions for validator.js v10.11.0
|
||||
// Project: https://github.com/chriso/validator.js
|
||||
// Definitions by: tgfjt <https://github.com/tgfjt>
|
||||
// Ilya Mochalov <https://github.com/chrootsu>
|
||||
@@ -8,6 +8,7 @@
|
||||
// Bonggyun Lee <https://github.com/deptno>
|
||||
// Naoto Yokoyama <https://github.com/builtinnya>
|
||||
// Philipp Katz <https://github.com/qqilihq>
|
||||
// Jace Warren <https://github.com/keatz55>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace ValidatorJS {
|
||||
@@ -140,6 +141,9 @@ declare namespace ValidatorJS {
|
||||
// check if the string is valid JSON (note: uses JSON.parse).
|
||||
isJSON(str: string): boolean;
|
||||
|
||||
// check if the string is valid JWT token.
|
||||
isJWT(str: string): boolean;
|
||||
|
||||
// check if the string is a valid latitude-longitude coordinate in the format lat,long or lat, long.
|
||||
isLatLong(str: string): boolean;
|
||||
|
||||
@@ -589,6 +593,11 @@ declare module "validator/lib/isJSON" {
|
||||
export = isJSON;
|
||||
}
|
||||
|
||||
declare module "validator/lib/isJWT" {
|
||||
const isJWT: typeof validator.isJWT;
|
||||
export = isJWT;
|
||||
}
|
||||
|
||||
declare module "validator/lib/isLatLong" {
|
||||
const isLatLong: typeof validator.isLatLong;
|
||||
export = isLatLong;
|
||||
|
||||
@@ -41,6 +41,7 @@ import isISRCFunc = require('validator/lib/isISRC');
|
||||
import isInFunc = require('validator/lib/isIn');
|
||||
import isIntFunc = require('validator/lib/isInt');
|
||||
import isJSONFunc = require('validator/lib/isJSON');
|
||||
import isJWTFunc = require('validator/lib/isJWT');
|
||||
import isLatLongFunc = require('validator/lib/isLatLong');
|
||||
import isLengthFunc = require('validator/lib/isLength');
|
||||
import isLowercaseFunc = require('validator/lib/isLowercase');
|
||||
@@ -181,6 +182,9 @@ import whitelistFunc = require('validator/lib/whitelist');
|
||||
let _isJSON = validator.isJSON;
|
||||
_isJSON = isJSONFunc;
|
||||
|
||||
let _isJWT = validator.isJWT;
|
||||
_isJWT = isJWTFunc;
|
||||
|
||||
let _isLatLong = validator.isLatLong;
|
||||
_isLatLong = isLatLongFunc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user