# sindresorhus/is-absolute-url architecture

> Architecture diagram of the GitHub repository sindresorhus/is-absolute-url, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sindresorhus/is-absolute-url
- Repository: https://github.com/sindresorhus/is-absolute-url

## Overview

This is a small JavaScript utility that answers whether a string is an absolute URL. A caller invokes the exported checker, which rejects non-strings, Windows paths, and strings without a URL scheme; by default it accepts only HTTP(S), while `httpOnly: false` permits other schemes. The declaration file describes the public API. The graph is limited to the runtime and its type contract; no broader product subsystems are documented.

Main entry points: [`index.js`](https://github.com/sindresorhus/is-absolute-url/blob/main/index.js) (URL checker), [`index.d.ts`](https://github.com/sindresorhus/is-absolute-url/blob/main/index.d.ts) (Type contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Calling code"))
node_checker["URL checker<br/>[index.js]"]
node_types["Type contract<br/>[index.d.ts]"]

node_caller -->|"invokes"| node_checker
node_checker -->|"returns boolean"| node_caller
node_types -->|"declares API"| node_checker

click node_checker "https://github.com/sindresorhus/is-absolute-url/blob/main/index.js"
click node_types "https://github.com/sindresorhus/is-absolute-url/blob/main/index.d.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_caller toneIndigo
class node_checker,node_types toneTeal
```

## Components

### Other components

- **Calling code**
- [URL checker](https://github.com/sindresorhus/is-absolute-url/blob/main/index.js): `index.js`
- [Type contract](https://github.com/sindresorhus/is-absolute-url/blob/main/index.d.ts): `index.d.ts`

## Connections

- Calling code → URL checker: invokes (evidence: `readme.md`)
- URL checker → Calling code: returns boolean (evidence: `readme.md`)
- Type contract → URL checker: declares API (evidence: `index.d.ts`)
