MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / getDomainFromString

Function getDomainFromString

helpers/api/sitemap/parse.js:20–24  ·  view source on GitHub ↗
( urlString )

Source from the content-addressed store, hash-verified

18]
19
20function getDomainFromString ( urlString ) {
21 const url = new URL( urlString )
22
23 return url.hostname
24}
25
26function getPathFromUrl ( urlString ) {
27 const url = new URL( urlString )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected