Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.3/class-validator/esm2015/decorator/string/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.3/class-validator/esm2015/decorator/string/IsJWT.js

import { buildMessage, ValidateBy } from '../common/ValidateBy';
import isJwtValidator from 'validator/lib/isJWT';
export const IS_JWT = 'isJwt';
/**
 * Checks if the string is valid JWT token.
 * If given value is not a string, then it returns false.
 */
export function isJWT(value) {
    return typeof value === 'string' && isJwtValidator(value);
}
/**
 * Checks if the string is valid JWT token.
 * If given value is not a string, then it returns false.
 */
export function IsJWT(validationOptions) {
    return ValidateBy({
        name: IS_JWT,
        validator: {
            validate: (value, args) => isJWT(value),
            defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be a jwt string', validationOptions),
        },
    }, validationOptions);
}
//# sourceMappingURL=IsJWT.js.map

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists