# Networks.includes() method · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.networks.includes/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

Whether an address falls inside any network in this set.

**Signature:**

```typescript
includes(ip: string): boolean;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| ip | string | a bare address of either family, with no `/prefix` |


**Returns:**

boolean

`true` if some network contains it.

## Exceptions

TypeError if `ip` is not a valid address. An empty string throws rather than returning `false`, so screen untrusted input with [isValid()](https://imqueue.org/api/net/latest/net.isvalid/) first — this is the call `@imqueue/http-protect` guards for that reason.

## Remarks

Dispatches on the address's own family and asks only that list, so an IPv6 lookup costs nothing on a v4-only set. A family this set has no networks for answers `false`.

