Skip to content

nsuite v2.2.1


nsuite / getNetworkAddresses

Function: getNetworkAddresses() ​

getNetworkAddresses(): string[]

Defined in: UtilsNetwork.ts:99

Returns the local IPv4 addresses that Vite classifies as network addresses.

Loopback addresses containing 127.0.0.1 are excluded. Returned addresses are sorted by their numeric IPv4 value in ascending order.

Returns ​

string[]

Sorted local IPv4 network addresses.

Example ​

ts
import { getNetworkAddresses } from "nsuite";

const addresses = getNetworkAddresses();

Released under the Apache-2.0 License.