index.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _toDate = require('./lib/toDate');
  6. var _toDate2 = _interopRequireDefault(_toDate);
  7. var _toFloat = require('./lib/toFloat');
  8. var _toFloat2 = _interopRequireDefault(_toFloat);
  9. var _toInt = require('./lib/toInt');
  10. var _toInt2 = _interopRequireDefault(_toInt);
  11. var _toBoolean = require('./lib/toBoolean');
  12. var _toBoolean2 = _interopRequireDefault(_toBoolean);
  13. var _equals = require('./lib/equals');
  14. var _equals2 = _interopRequireDefault(_equals);
  15. var _contains = require('./lib/contains');
  16. var _contains2 = _interopRequireDefault(_contains);
  17. var _matches = require('./lib/matches');
  18. var _matches2 = _interopRequireDefault(_matches);
  19. var _isEmail = require('./lib/isEmail');
  20. var _isEmail2 = _interopRequireDefault(_isEmail);
  21. var _isURL = require('./lib/isURL');
  22. var _isURL2 = _interopRequireDefault(_isURL);
  23. var _isMACAddress = require('./lib/isMACAddress');
  24. var _isMACAddress2 = _interopRequireDefault(_isMACAddress);
  25. var _isIP = require('./lib/isIP');
  26. var _isIP2 = _interopRequireDefault(_isIP);
  27. var _isFQDN = require('./lib/isFQDN');
  28. var _isFQDN2 = _interopRequireDefault(_isFQDN);
  29. var _isBoolean = require('./lib/isBoolean');
  30. var _isBoolean2 = _interopRequireDefault(_isBoolean);
  31. var _isAlpha = require('./lib/isAlpha');
  32. var _isAlpha2 = _interopRequireDefault(_isAlpha);
  33. var _isAlphanumeric = require('./lib/isAlphanumeric');
  34. var _isAlphanumeric2 = _interopRequireDefault(_isAlphanumeric);
  35. var _isNumeric = require('./lib/isNumeric');
  36. var _isNumeric2 = _interopRequireDefault(_isNumeric);
  37. var _isLowercase = require('./lib/isLowercase');
  38. var _isLowercase2 = _interopRequireDefault(_isLowercase);
  39. var _isUppercase = require('./lib/isUppercase');
  40. var _isUppercase2 = _interopRequireDefault(_isUppercase);
  41. var _isAscii = require('./lib/isAscii');
  42. var _isAscii2 = _interopRequireDefault(_isAscii);
  43. var _isFullWidth = require('./lib/isFullWidth');
  44. var _isFullWidth2 = _interopRequireDefault(_isFullWidth);
  45. var _isHalfWidth = require('./lib/isHalfWidth');
  46. var _isHalfWidth2 = _interopRequireDefault(_isHalfWidth);
  47. var _isVariableWidth = require('./lib/isVariableWidth');
  48. var _isVariableWidth2 = _interopRequireDefault(_isVariableWidth);
  49. var _isMultibyte = require('./lib/isMultibyte');
  50. var _isMultibyte2 = _interopRequireDefault(_isMultibyte);
  51. var _isSurrogatePair = require('./lib/isSurrogatePair');
  52. var _isSurrogatePair2 = _interopRequireDefault(_isSurrogatePair);
  53. var _isInt = require('./lib/isInt');
  54. var _isInt2 = _interopRequireDefault(_isInt);
  55. var _isFloat = require('./lib/isFloat');
  56. var _isFloat2 = _interopRequireDefault(_isFloat);
  57. var _isDecimal = require('./lib/isDecimal');
  58. var _isDecimal2 = _interopRequireDefault(_isDecimal);
  59. var _isHexadecimal = require('./lib/isHexadecimal');
  60. var _isHexadecimal2 = _interopRequireDefault(_isHexadecimal);
  61. var _isDivisibleBy = require('./lib/isDivisibleBy');
  62. var _isDivisibleBy2 = _interopRequireDefault(_isDivisibleBy);
  63. var _isHexColor = require('./lib/isHexColor');
  64. var _isHexColor2 = _interopRequireDefault(_isHexColor);
  65. var _isMD = require('./lib/isMD5');
  66. var _isMD2 = _interopRequireDefault(_isMD);
  67. var _isJSON = require('./lib/isJSON');
  68. var _isJSON2 = _interopRequireDefault(_isJSON);
  69. var _isNull = require('./lib/isNull');
  70. var _isNull2 = _interopRequireDefault(_isNull);
  71. var _isLength = require('./lib/isLength');
  72. var _isLength2 = _interopRequireDefault(_isLength);
  73. var _isByteLength = require('./lib/isByteLength');
  74. var _isByteLength2 = _interopRequireDefault(_isByteLength);
  75. var _isUUID = require('./lib/isUUID');
  76. var _isUUID2 = _interopRequireDefault(_isUUID);
  77. var _isMongoId = require('./lib/isMongoId');
  78. var _isMongoId2 = _interopRequireDefault(_isMongoId);
  79. var _isDate = require('./lib/isDate');
  80. var _isDate2 = _interopRequireDefault(_isDate);
  81. var _isAfter = require('./lib/isAfter');
  82. var _isAfter2 = _interopRequireDefault(_isAfter);
  83. var _isBefore = require('./lib/isBefore');
  84. var _isBefore2 = _interopRequireDefault(_isBefore);
  85. var _isIn = require('./lib/isIn');
  86. var _isIn2 = _interopRequireDefault(_isIn);
  87. var _isCreditCard = require('./lib/isCreditCard');
  88. var _isCreditCard2 = _interopRequireDefault(_isCreditCard);
  89. var _isISIN = require('./lib/isISIN');
  90. var _isISIN2 = _interopRequireDefault(_isISIN);
  91. var _isISBN = require('./lib/isISBN');
  92. var _isISBN2 = _interopRequireDefault(_isISBN);
  93. var _isMobilePhone = require('./lib/isMobilePhone');
  94. var _isMobilePhone2 = _interopRequireDefault(_isMobilePhone);
  95. var _isCurrency = require('./lib/isCurrency');
  96. var _isCurrency2 = _interopRequireDefault(_isCurrency);
  97. var _isISO = require('./lib/isISO8601');
  98. var _isISO2 = _interopRequireDefault(_isISO);
  99. var _isBase = require('./lib/isBase64');
  100. var _isBase2 = _interopRequireDefault(_isBase);
  101. var _isDataURI = require('./lib/isDataURI');
  102. var _isDataURI2 = _interopRequireDefault(_isDataURI);
  103. var _ltrim = require('./lib/ltrim');
  104. var _ltrim2 = _interopRequireDefault(_ltrim);
  105. var _rtrim = require('./lib/rtrim');
  106. var _rtrim2 = _interopRequireDefault(_rtrim);
  107. var _trim = require('./lib/trim');
  108. var _trim2 = _interopRequireDefault(_trim);
  109. var _escape = require('./lib/escape');
  110. var _escape2 = _interopRequireDefault(_escape);
  111. var _unescape = require('./lib/unescape');
  112. var _unescape2 = _interopRequireDefault(_unescape);
  113. var _stripLow = require('./lib/stripLow');
  114. var _stripLow2 = _interopRequireDefault(_stripLow);
  115. var _whitelist = require('./lib/whitelist');
  116. var _whitelist2 = _interopRequireDefault(_whitelist);
  117. var _blacklist = require('./lib/blacklist');
  118. var _blacklist2 = _interopRequireDefault(_blacklist);
  119. var _isWhitelisted = require('./lib/isWhitelisted');
  120. var _isWhitelisted2 = _interopRequireDefault(_isWhitelisted);
  121. var _normalizeEmail = require('./lib/normalizeEmail');
  122. var _normalizeEmail2 = _interopRequireDefault(_normalizeEmail);
  123. var _toString = require('./lib/util/toString');
  124. var _toString2 = _interopRequireDefault(_toString);
  125. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  126. var version = '5.7.0';
  127. var validator = {
  128. version: version,
  129. toDate: _toDate2.default,
  130. toFloat: _toFloat2.default, toInt: _toInt2.default,
  131. toBoolean: _toBoolean2.default,
  132. equals: _equals2.default, contains: _contains2.default, matches: _matches2.default,
  133. isEmail: _isEmail2.default, isURL: _isURL2.default, isMACAddress: _isMACAddress2.default, isIP: _isIP2.default, isFQDN: _isFQDN2.default,
  134. isBoolean: _isBoolean2.default,
  135. isAlpha: _isAlpha2.default, isAlphanumeric: _isAlphanumeric2.default, isNumeric: _isNumeric2.default, isLowercase: _isLowercase2.default, isUppercase: _isUppercase2.default,
  136. isAscii: _isAscii2.default, isFullWidth: _isFullWidth2.default, isHalfWidth: _isHalfWidth2.default, isVariableWidth: _isVariableWidth2.default,
  137. isMultibyte: _isMultibyte2.default, isSurrogatePair: _isSurrogatePair2.default,
  138. isInt: _isInt2.default, isFloat: _isFloat2.default, isDecimal: _isDecimal2.default, isHexadecimal: _isHexadecimal2.default, isDivisibleBy: _isDivisibleBy2.default,
  139. isHexColor: _isHexColor2.default,
  140. isMD5: _isMD2.default,
  141. isJSON: _isJSON2.default,
  142. isNull: _isNull2.default,
  143. isLength: _isLength2.default, isByteLength: _isByteLength2.default,
  144. isUUID: _isUUID2.default, isMongoId: _isMongoId2.default,
  145. isDate: _isDate2.default, isAfter: _isAfter2.default, isBefore: _isBefore2.default,
  146. isIn: _isIn2.default,
  147. isCreditCard: _isCreditCard2.default,
  148. isISIN: _isISIN2.default, isISBN: _isISBN2.default,
  149. isMobilePhone: _isMobilePhone2.default,
  150. isCurrency: _isCurrency2.default,
  151. isISO8601: _isISO2.default,
  152. isBase64: _isBase2.default, isDataURI: _isDataURI2.default,
  153. ltrim: _ltrim2.default, rtrim: _rtrim2.default, trim: _trim2.default,
  154. escape: _escape2.default, unescape: _unescape2.default, stripLow: _stripLow2.default,
  155. whitelist: _whitelist2.default, blacklist: _blacklist2.default,
  156. isWhitelisted: _isWhitelisted2.default,
  157. normalizeEmail: _normalizeEmail2.default,
  158. toString: _toString2.default
  159. };
  160. exports.default = validator;
  161. module.exports = exports['default'];