Skip to content

isLocalhostUrl()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / isLocalhostUrl

isLocalhostUrl(url): boolean

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22777

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