function trimNumber(number, country, metadata) {
	const nationalSignificantNumberPart = getNationalSignificantNumberDigits(number, country, metadata)
	if (nationalSignificantNumberPart) {
		const overflowDigitsCount = nationalSignificantNumberPart.length - getMaxNumberLength(country, metadata)
		if (overflowDigitsCount > 0) {
			return number.slice(0, number.length - overflowDigitsCount)
		}
	}
	return number
}
Trims phone number digits if they exceed the maximum possible length
for a national (significant) number for the country.
@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} Can be empty.