1export const domainFromURL = (url) => {2 return url3 .replace("http://", "")4 .replace("https://", "")5 .replace("www.", "")6 .split(/[/?#]/)[0];7};
Written byAbhith Rajan Follow @AbhithRajan
Abhith Rajan is an aspiring software engineer with more than nine years of experience and has a proven successful track record of delivering technology-based products and services.
Connect