export const domainFromURL = (url) => {
  return url
    .replace("http://", "")
    .replace("https://", "")
    .replace("www.", "")
    .split(/[/?#]/)[0];
};Written byAbhith Rajan Follow @AbhithRajan
Abhith Rajan 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



