function getGSuiteSupportedDomains( domains ) {
	return domains.filter( function( domain ) {
		const wpcomHosted =
			includes( [ domainTypes.REGISTERED ], domain.type ) &&
			( domain.hasWpcomNameservers || hasGSuite( domain ) );
		const mapped = includes( [ domainTypes.MAPPED ], domain.type );
		const notOtherProvidor =
			domain.googleAppsSubscription && domain.googleAppsSubscription.status !== 'other_provider';
		return ( wpcomHosted || mapped ) && canDomainAddGSuite( domain.name ) && notOtherProvidor;
	} );
}
function getGSuiteSupportedDomains( domains ) {
	return domains.filter( function( domain ) {
		const wpcomHosted =
			includes( [ domainTypes.REGISTERED ], domain.type ) &&
			( domain.hasWpcomNameservers || hasGSuite( domain ) );
		const mapped = includes( [ domainTypes.MAPPED ], domain.type );
		const notOtherProvidor =
			domain.googleAppsSubscription && domain.googleAppsSubscription.status !== 'other_provider';
		return ( wpcomHosted || mapped ) && canDomainAddGSuite( domain.name ) && notOtherProvidor;
	} );
}
function getGSuiteSupportedDomains ( domains ) { return domains . filter ( function ( domain ) { const wpcomHosted = includes ( [ domainTypes . REGISTERED ] , domain . type ) && ( domain . hasWpcomNameservers || hasGSuite ( domain ) ) ; const mapped = includes ( [ domainTypes . MAPPED ] , domain . type ) ; const notOtherProvidor = domain . googleAppsSubscription && domain . googleAppsSubscription . status !== 'other_provider' ; return ( wpcomHosted || mapped ) && canDomainAddGSuite ( domain . name ) && notOtherProvidor ; } ) ; }
Filters a list of domains by the domains that eligible for G Suite

@param {Array} domains - list of domain objects
@returns {Array} - Array of G Suite supported domans
Filters a list of domains by the domains that eligible for G Suite