isLocalhostUrl()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / isLocalhostUrl
Function: isLocalhostUrl()
Section titled “Function: isLocalhostUrl()”isLocalhostUrl(
url):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22777
Check if a URL points to localhost
Parameters
Section titled “Parameters”string
URL to check
Returns
Section titled “Returns”boolean
true if URL is localhost
Example
Section titled “Example”isLocalhostUrl('http://localhost:8899') // trueisLocalhostUrl('https://api.mainnet.solana.com') // false