index.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // `parsePhoneNumber()` named export has been renamed to `parsePhoneNumberWithError()`.
  2. export { parsePhoneNumberWithError, parsePhoneNumberWithError as parsePhoneNumber } from './min/exports/parsePhoneNumberWithError.js'
  3. // `parsePhoneNumberFromString()` named export is now considered legacy:
  4. // it has been promoted to a default export due to being too verbose.
  5. export { parsePhoneNumber as parsePhoneNumberFromString, parsePhoneNumber as default } from './min/exports/parsePhoneNumber.js'
  6. export { isValidPhoneNumber } from './min/exports/isValidPhoneNumber.js'
  7. export { isPossiblePhoneNumber } from './min/exports/isPossiblePhoneNumber.js'
  8. export { validatePhoneNumberLength } from './min/exports/validatePhoneNumberLength.js'
  9. // Deprecated.
  10. export { findNumbers } from './min/exports/findNumbers.js'
  11. export { searchNumbers } from './min/exports/searchNumbers.js'
  12. export { findPhoneNumbersInText } from './min/exports/findPhoneNumbersInText.js'
  13. export { searchPhoneNumbersInText } from './min/exports/searchPhoneNumbersInText.js'
  14. export { PhoneNumberMatcher } from './min/exports/PhoneNumberMatcher.js'
  15. export { AsYouType } from './min/exports/AsYouType.js'
  16. export { DIGIT_PLACEHOLDER } from './es6/AsYouTypeFormatter.js'
  17. export { isSupportedCountry } from './min/exports/isSupportedCountry.js'
  18. export { getCountries } from './min/exports/getCountries.js'
  19. // `getPhoneCode` name is deprecated, use `getCountryCallingCode` instead.
  20. export { getCountryCallingCode, getCountryCallingCode as getPhoneCode } from './min/exports/getCountryCallingCode.js'
  21. export { getExtPrefix } from './min/exports/getExtPrefix.js'
  22. export { Metadata } from './min/exports/Metadata.js'
  23. export { getExampleNumber } from './min/exports/getExampleNumber.js'
  24. export { formatIncompletePhoneNumber } from './min/exports/formatIncompletePhoneNumber.js'
  25. export {
  26. ParseError,
  27. parseIncompletePhoneNumber,
  28. parsePhoneNumberCharacter,
  29. parseDigits,
  30. parseRFC3966,
  31. formatRFC3966
  32. } from './core/index.js'
  33. // Deprecated (old) exports.
  34. export { parse as parseNumber, parse } from './index.es6.exports/parse.js'
  35. export { format as formatNumber, format } from './index.es6.exports/format.js'
  36. export { getNumberType } from './index.es6.exports/getNumberType.js'
  37. export { isPossibleNumber } from './index.es6.exports/isPossibleNumber.js'
  38. export { isValidNumber } from './index.es6.exports/isValidNumber.js'
  39. export { isValidNumberForRegion } from './index.es6.exports/isValidNumberForRegion.js'
  40. export { findPhoneNumbers } from './index.es6.exports/findPhoneNumbers.js'
  41. export { searchPhoneNumbers } from './index.es6.exports/searchPhoneNumbers.js'
  42. export { PhoneNumberSearch } from './index.es6.exports/PhoneNumberSearch.js'
  43. // Deprecated DIGITS export.
  44. // (it was used in `react-phone-number-input`)
  45. export { DIGITS } from './es6/helpers/parseDigits.js'
  46. // Deprecated "custom" exports.
  47. export { default as parseCustom } from './es6/legacy/parse.js'
  48. export { default as formatCustom } from './es6/legacy/format.js'
  49. export { default as isValidNumberCustom } from './es6/legacy/isValidNumber.js'
  50. export { default as findPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'
  51. export { searchPhoneNumbers as searchPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'
  52. export { PhoneNumberSearch as PhoneNumberSearchCustom } from './es6/legacy/findPhoneNumbersInitialImplementation.js'
  53. export { default as getNumberTypeCustom } from './es6/legacy/getNumberType.js'
  54. export { default as getCountryCallingCodeCustom, default as getPhoneCodeCustom } from './es6/getCountryCallingCode.js'
  55. export { default as AsYouTypeCustom } from './es6/AsYouType.js'