isPossiblePhoneNumber.js 406 B

123456789101112
  1. import normalizeArguments from './normalizeArguments.js'
  2. import parsePhoneNumber from './parsePhoneNumber_.js'
  3. export default function isPossiblePhoneNumber() {
  4. let { text, options, metadata } = normalizeArguments(arguments)
  5. options = {
  6. ...options,
  7. extract: false
  8. }
  9. const phoneNumber = parsePhoneNumber(text, options, metadata)
  10. return phoneNumber && phoneNumber.isPossible() || false
  11. }