TikTok has avoided being banned in the US thanks to Donald Trump's push to have its US operations controlled by the US.