index.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _toDate = _interopRequireDefault(require("./lib/toDate"));
  7. var _toFloat = _interopRequireDefault(require("./lib/toFloat"));
  8. var _toInt = _interopRequireDefault(require("./lib/toInt"));
  9. var _toBoolean = _interopRequireDefault(require("./lib/toBoolean"));
  10. var _equals = _interopRequireDefault(require("./lib/equals"));
  11. var _contains = _interopRequireDefault(require("./lib/contains"));
  12. var _matches = _interopRequireDefault(require("./lib/matches"));
  13. var _isEmail = _interopRequireDefault(require("./lib/isEmail"));
  14. var _isURL = _interopRequireDefault(require("./lib/isURL"));
  15. var _isMACAddress = _interopRequireDefault(require("./lib/isMACAddress"));
  16. var _isIP = _interopRequireDefault(require("./lib/isIP"));
  17. var _isIPRange = _interopRequireDefault(require("./lib/isIPRange"));
  18. var _isFQDN = _interopRequireDefault(require("./lib/isFQDN"));
  19. var _isBoolean = _interopRequireDefault(require("./lib/isBoolean"));
  20. var _isAlpha = _interopRequireWildcard(require("./lib/isAlpha"));
  21. var _isAlphanumeric = _interopRequireWildcard(require("./lib/isAlphanumeric"));
  22. var _isNumeric = _interopRequireDefault(require("./lib/isNumeric"));
  23. var _isPort = _interopRequireDefault(require("./lib/isPort"));
  24. var _isLowercase = _interopRequireDefault(require("./lib/isLowercase"));
  25. var _isUppercase = _interopRequireDefault(require("./lib/isUppercase"));
  26. var _isAscii = _interopRequireDefault(require("./lib/isAscii"));
  27. var _isFullWidth = _interopRequireDefault(require("./lib/isFullWidth"));
  28. var _isHalfWidth = _interopRequireDefault(require("./lib/isHalfWidth"));
  29. var _isVariableWidth = _interopRequireDefault(require("./lib/isVariableWidth"));
  30. var _isMultibyte = _interopRequireDefault(require("./lib/isMultibyte"));
  31. var _isSurrogatePair = _interopRequireDefault(require("./lib/isSurrogatePair"));
  32. var _isInt = _interopRequireDefault(require("./lib/isInt"));
  33. var _isFloat = _interopRequireWildcard(require("./lib/isFloat"));
  34. var _isDecimal = _interopRequireDefault(require("./lib/isDecimal"));
  35. var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal"));
  36. var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy"));
  37. var _isHexColor = _interopRequireDefault(require("./lib/isHexColor"));
  38. var _isISRC = _interopRequireDefault(require("./lib/isISRC"));
  39. var _isMD = _interopRequireDefault(require("./lib/isMD5"));
  40. var _isHash = _interopRequireDefault(require("./lib/isHash"));
  41. var _isJWT = _interopRequireDefault(require("./lib/isJWT"));
  42. var _isJSON = _interopRequireDefault(require("./lib/isJSON"));
  43. var _isEmpty = _interopRequireDefault(require("./lib/isEmpty"));
  44. var _isLength = _interopRequireDefault(require("./lib/isLength"));
  45. var _isByteLength = _interopRequireDefault(require("./lib/isByteLength"));
  46. var _isUUID = _interopRequireDefault(require("./lib/isUUID"));
  47. var _isMongoId = _interopRequireDefault(require("./lib/isMongoId"));
  48. var _isAfter = _interopRequireDefault(require("./lib/isAfter"));
  49. var _isBefore = _interopRequireDefault(require("./lib/isBefore"));
  50. var _isIn = _interopRequireDefault(require("./lib/isIn"));
  51. var _isCreditCard = _interopRequireDefault(require("./lib/isCreditCard"));
  52. var _isIdentityCard = _interopRequireDefault(require("./lib/isIdentityCard"));
  53. var _isISIN = _interopRequireDefault(require("./lib/isISIN"));
  54. var _isISBN = _interopRequireDefault(require("./lib/isISBN"));
  55. var _isISSN = _interopRequireDefault(require("./lib/isISSN"));
  56. var _isMobilePhone = _interopRequireWildcard(require("./lib/isMobilePhone"));
  57. var _isCurrency = _interopRequireDefault(require("./lib/isCurrency"));
  58. var _isISO = _interopRequireDefault(require("./lib/isISO8601"));
  59. var _isRFC = _interopRequireDefault(require("./lib/isRFC3339"));
  60. var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2"));
  61. var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3"));
  62. var _isBase = _interopRequireDefault(require("./lib/isBase64"));
  63. var _isDataURI = _interopRequireDefault(require("./lib/isDataURI"));
  64. var _isMagnetURI = _interopRequireDefault(require("./lib/isMagnetURI"));
  65. var _isMimeType = _interopRequireDefault(require("./lib/isMimeType"));
  66. var _isLatLong = _interopRequireDefault(require("./lib/isLatLong"));
  67. var _isPostalCode = _interopRequireWildcard(require("./lib/isPostalCode"));
  68. var _ltrim = _interopRequireDefault(require("./lib/ltrim"));
  69. var _rtrim = _interopRequireDefault(require("./lib/rtrim"));
  70. var _trim = _interopRequireDefault(require("./lib/trim"));
  71. var _escape = _interopRequireDefault(require("./lib/escape"));
  72. var _unescape = _interopRequireDefault(require("./lib/unescape"));
  73. var _stripLow = _interopRequireDefault(require("./lib/stripLow"));
  74. var _whitelist = _interopRequireDefault(require("./lib/whitelist"));
  75. var _blacklist = _interopRequireDefault(require("./lib/blacklist"));
  76. var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
  77. var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
  78. var _toString = _interopRequireDefault(require("./lib/util/toString"));
  79. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
  80. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81. var version = '10.11.0';
  82. var validator = {
  83. version: version,
  84. toDate: _toDate.default,
  85. toFloat: _toFloat.default,
  86. toInt: _toInt.default,
  87. toBoolean: _toBoolean.default,
  88. equals: _equals.default,
  89. contains: _contains.default,
  90. matches: _matches.default,
  91. isEmail: _isEmail.default,
  92. isURL: _isURL.default,
  93. isMACAddress: _isMACAddress.default,
  94. isIP: _isIP.default,
  95. isIPRange: _isIPRange.default,
  96. isFQDN: _isFQDN.default,
  97. isBoolean: _isBoolean.default,
  98. isAlpha: _isAlpha.default,
  99. isAlphaLocales: _isAlpha.locales,
  100. isAlphanumeric: _isAlphanumeric.default,
  101. isAlphanumericLocales: _isAlphanumeric.locales,
  102. isNumeric: _isNumeric.default,
  103. isPort: _isPort.default,
  104. isLowercase: _isLowercase.default,
  105. isUppercase: _isUppercase.default,
  106. isAscii: _isAscii.default,
  107. isFullWidth: _isFullWidth.default,
  108. isHalfWidth: _isHalfWidth.default,
  109. isVariableWidth: _isVariableWidth.default,
  110. isMultibyte: _isMultibyte.default,
  111. isSurrogatePair: _isSurrogatePair.default,
  112. isInt: _isInt.default,
  113. isFloat: _isFloat.default,
  114. isFloatLocales: _isFloat.locales,
  115. isDecimal: _isDecimal.default,
  116. isHexadecimal: _isHexadecimal.default,
  117. isDivisibleBy: _isDivisibleBy.default,
  118. isHexColor: _isHexColor.default,
  119. isISRC: _isISRC.default,
  120. isMD5: _isMD.default,
  121. isHash: _isHash.default,
  122. isJWT: _isJWT.default,
  123. isJSON: _isJSON.default,
  124. isEmpty: _isEmpty.default,
  125. isLength: _isLength.default,
  126. isByteLength: _isByteLength.default,
  127. isUUID: _isUUID.default,
  128. isMongoId: _isMongoId.default,
  129. isAfter: _isAfter.default,
  130. isBefore: _isBefore.default,
  131. isIn: _isIn.default,
  132. isCreditCard: _isCreditCard.default,
  133. isIdentityCard: _isIdentityCard.default,
  134. isISIN: _isISIN.default,
  135. isISBN: _isISBN.default,
  136. isISSN: _isISSN.default,
  137. isMobilePhone: _isMobilePhone.default,
  138. isMobilePhoneLocales: _isMobilePhone.locales,
  139. isPostalCode: _isPostalCode.default,
  140. isPostalCodeLocales: _isPostalCode.locales,
  141. isCurrency: _isCurrency.default,
  142. isISO8601: _isISO.default,
  143. isRFC3339: _isRFC.default,
  144. isISO31661Alpha2: _isISO31661Alpha.default,
  145. isISO31661Alpha3: _isISO31661Alpha2.default,
  146. isBase64: _isBase.default,
  147. isDataURI: _isDataURI.default,
  148. isMagnetURI: _isMagnetURI.default,
  149. isMimeType: _isMimeType.default,
  150. isLatLong: _isLatLong.default,
  151. ltrim: _ltrim.default,
  152. rtrim: _rtrim.default,
  153. trim: _trim.default,
  154. escape: _escape.default,
  155. unescape: _unescape.default,
  156. stripLow: _stripLow.default,
  157. whitelist: _whitelist.default,
  158. blacklist: _blacklist.default,
  159. isWhitelisted: _isWhitelisted.default,
  160. normalizeEmail: _normalizeEmail.default,
  161. toString: _toString.default
  162. };
  163. var _default = validator;
  164. exports.default = _default;
  165. module.exports = exports.default;
  166. module.exports.default = exports.default;