export const domainFromURL = (url) => {
return url
.replace("http://", "")
.replace("https://", "")
.replace("www.", "")
.split(/[/?#]/)[0];
};
Written byTarun Sharma Follow @tkssharma
Tarun Sharma is a software engineer by day and a full-stack developer by night. He's coding for almost a decade now. He codes 🧑💻, write ✍️, learn 📖 and advocate 👍.
Connect