The question as to whether any US President has ever taken such draconian and unpopular action in the past, was raised on this thread earlier today (sorry to be late to the party, been at work). You bet there has! Several times! Trump is by no means the first and it's always been at the expense of the more fragile spectrum of society.
In 1882, the "Chinese Exclusion Act and the Immigration Act." This law was passed to specifically discriminate against Chinese and itwasn't until 1892 that they were allowed in to the USA legally, and, even then, they could not apply for citizenship.
In 1917, Woodrow Wilson barred all "idiots, imbeciles, epileptics, alcoholics, poor, criminals, beggars, any person suffering attacks of insanity from entering the country."
In 1924 Calvin Coolidge signed the Immigration Restrictions Act, supported by the KKK, "barred all of Asia because America must remain America".
In 1941 FD Roosevelt, on the advice of General John DeWitt, ordered 100,000 Japanese Americans to go into enforced slave labour camps because "although they have become Americanised, their racial strains are undiluted ". He took all of their meagre possessions too.
In 1965, the Immigration and Nationality Act came into force with the aim of being "a fair and just system for immigration " But it wasn't until 1990 that homosexual men and women enjoyed the same privileges for entry into the country.
So, the conclusion could be drawn that whilst Trump is unpleasant, racist, xenophobic, sexist etc - unique he ain't. It's all been done before. You just never knew. Link for those interested: newrepublic.com/article/140234/trumps-refugee-ban-isnt-un-american-think