function e164(number, country, metadata) {
	if (!number) {
		return
	}
	// If the phone number is being input in international format.
	if (number[0] === '+') {
		// If it's just the `+` sign then return nothing.
		if (number === '+') {
			return
		}
		// Return a E.164 phone number.
		//
		// Could return `number` "as is" here, but there's a possibility
		// that some user might incorrectly input an international number
		// with a "national prefix". Such numbers aren't considered valid,
		// but `libphonenumber-js` is "forgiving" when it comes to parsing
		// user's input, and this input component follows that behavior.
		//
		const asYouType = new AsYouType(country, metadata)
		asYouType.input(number)
		// This function would return `undefined` only when `number` is `"+"`,
		// but at this point it is known that `number` is not `"+"`.
		return asYouType.getNumberValue()
	}
	// For non-international phone numbers
	// an accompanying country code is required.
	// The situation when `country` is `undefined`
	// and a non-international phone number is passed
	// to this function shouldn't happen.
	if (!country) {
		return
	}
	const partial_national_significant_number = getNationalSignificantNumberDigits(number, country, metadata)
	//
	// Even if no "national (significant) number" digits have been input,
	// still return a non-`undefined` value.
	// https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/113
	//
	// For example, if the user has selected country `US` and entered `"1"`
	// then that `"1"` is just a "national prefix" and no "national (significant) number"
	// digits have been input yet. Still, return `"+1"` as `value` in such cases,
	// because otherwise the app would think that the input is empty and mark it as such
	// while in reality it isn't empty, which might be thought of as a "bug", or just
	// a "weird" behavior.
	//
	// if (partial_national_significant_number) {
		return `+${getCountryCallingCode(country, metadata)}${partial_national_significant_number || ''}`
	// }
}
Converts phone number digits to a (possibly incomplete) E.164 phone number.
@param  {string?} number - A possibly incomplete phone number digits string. Can be a possibly incomplete E.164 phone number.
@param  {string?} country
@param  {object} metadata - `libphonenumber-js` metadata.
@return {string?}