By and large the United States has been able to resist the temptation to close its doors to the world.