Skip to content

isLocalhostUrl()

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / isLocalhostUrl

isLocalhostUrl(url): boolean

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:23113

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