Skip to content

URI Utils

Terminal window
pnpm add @theholocron/uri-utils
import { getParam } from "@theholocron/uri-utils";
getParam("https://example.com?page=2&limit=10", "page"); // "2"
getParam("https://example.com?page=2&limit=10", "sort"); // null
getParam("https://example.com", "page"); // ""

The full API reference is generated from the package’s TSDoc comments.