Skip to content

isLocalhostUrl()

SIP Protocol API Reference v0.12.0


SIP Protocol API Reference / isLocalhostUrl

isLocalhostUrl(url): boolean

Defined in: @sip-protocol/sdk/dist/index-rqQpCeVM.d.ts:23077

Check if a URL points to localhost

string

URL to check

boolean

true if URL is localhost

isLocalhostUrl('http://localhost:8899') // true
isLocalhostUrl('https://api.mainnet.solana.com') // false