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