constants.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.WHITESPACE = exports.VALID_PUNCTUATION = exports.VALID_DIGITS = exports.PLUS_CHARS = exports.MIN_LENGTH_FOR_NSN = exports.MAX_LENGTH_FOR_NSN = exports.MAX_LENGTH_COUNTRY_CODE = void 0;
  6. // The minimum length of the national significant number.
  7. var MIN_LENGTH_FOR_NSN = 2; // The ITU says the maximum length should be 15,
  8. // but one can find longer numbers in Germany.
  9. exports.MIN_LENGTH_FOR_NSN = MIN_LENGTH_FOR_NSN;
  10. var MAX_LENGTH_FOR_NSN = 17; // The maximum length of the country calling code.
  11. exports.MAX_LENGTH_FOR_NSN = MAX_LENGTH_FOR_NSN;
  12. var MAX_LENGTH_COUNTRY_CODE = 3; // Digits accepted in phone numbers
  13. // (ascii, fullwidth, arabic-indic, and eastern arabic digits).
  14. exports.MAX_LENGTH_COUNTRY_CODE = MAX_LENGTH_COUNTRY_CODE;
  15. var VALID_DIGITS = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9"; // `DASHES` will be right after the opening square bracket of the "character class"
  16. exports.VALID_DIGITS = VALID_DIGITS;
  17. var DASHES = "-\u2010-\u2015\u2212\u30FC\uFF0D";
  18. var SLASHES = "\uFF0F/";
  19. var DOTS = "\uFF0E.";
  20. var WHITESPACE = " \xA0\xAD\u200B\u2060\u3000";
  21. exports.WHITESPACE = WHITESPACE;
  22. var BRACKETS = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]"; // export const OPENING_BRACKETS = '(\uFF08\uFF3B\\\['
  23. var TILDES = "~\u2053\u223C\uFF5E"; // Regular expression of acceptable punctuation found in phone numbers. This
  24. // excludes punctuation found as a leading character only. This consists of dash
  25. // characters, white space characters, full stops, slashes, square brackets,
  26. // parentheses and tildes. Full-width variants are also present.
  27. var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
  28. exports.VALID_PUNCTUATION = VALID_PUNCTUATION;
  29. var PLUS_CHARS = "+\uFF0B"; // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')
  30. exports.PLUS_CHARS = PLUS_CHARS;
  31. //# sourceMappingURL=constants.js.map