'use strict';

/**
 *
 * @param phoneNumber
 * @returns True if number that starts with "+" and contains a mix of digits and spaces with a configurable min length that defaults to 4.
 */
const isValidPhoneNumber = (phoneNumber, minLength = 4) => /^\+[\d-\s]+$/.test(phoneNumber) && (phoneNumber.match(/\d+/g)?.join('').length ?? 0) >= minLength;

exports.isValidPhoneNumber = isValidPhoneNumber;
//# sourceMappingURL=isValidPhoneNumber.js.map
