constants.js 1.4 KB

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