isValidNumber.js 633 B

1234567891011121314151617
  1. import _isValidNumber from '../isValid.js';
  2. import { normalizeArguments } from './getNumberType.js'; // Finds out national phone number type (fixed line, mobile, etc)
  3. export default function isValidNumber() {
  4. var _normalizeArguments = normalizeArguments(arguments),
  5. input = _normalizeArguments.input,
  6. options = _normalizeArguments.options,
  7. metadata = _normalizeArguments.metadata; // `parseNumber()` would return `{}` when no phone number could be parsed from the input.
  8. if (!input.phone) {
  9. return false;
  10. }
  11. return _isValidNumber(input, options, metadata);
  12. }
  13. //# sourceMappingURL=isValidNumber.js.map