Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.5/class-validator/esm5/decorator/string/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.5/class-validator/esm5/decorator/string/IsDecimal.js.map

{"version":3,"file":"IsDecimal.js","sourceRoot":"","sources":["../../../../src/decorator/string/IsDecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAGzD,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,OAAsC;IAC9E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CACvB,OAAsC,EACtC,iBAAqC;IAErC,OAAO,UAAU,CACf;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACT,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAc,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAtC,CAAsC;YAC1E,cAAc,EAAE,YAAY,CAC1B,UAAA,UAAU,IAAI,OAAA,UAAU,GAAG,0CAA0C,EAAvD,CAAuD,EACrE,iBAAiB,CAClB;SACF;KACF,EACD,iBAAiB,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationOptions } from '../ValidationOptions';\nimport { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isDecimalValidator from 'validator/lib/isDecimal';\nimport * as ValidatorJS from 'validator';\n\nexport const IS_DECIMAL = 'isDecimal';\n\n/**\n * Checks if the string is a valid decimal.\n * If given value is not a string, then it returns false.\n */\nexport function isDecimal(value: unknown, options?: ValidatorJS.IsDecimalOptions): boolean {\n  return typeof value === 'string' && isDecimalValidator(value, options);\n}\n\n/**\n * Checks if the string is a valid decimal.\n * If given value is not a string, then it returns false.\n */\nexport function IsDecimal(\n  options?: ValidatorJS.IsDecimalOptions,\n  validationOptions?: ValidationOptions\n): PropertyDecorator {\n  return ValidateBy(\n    {\n      name: IS_DECIMAL,\n      constraints: [options],\n      validator: {\n        validate: (value, args): boolean => isDecimal(value, args?.constraints[0]),\n        defaultMessage: buildMessage(\n          eachPrefix => eachPrefix + '$property is not a valid decimal number.',\n          validationOptions\n        ),\n      },\n    },\n    validationOptions\n  );\n}\n"]}

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