URI Utils
@theholocron/uri-utils provides lightweight helpers for reading values from URLs.
Install
pnpm add @theholocron/uri-utilsAPI
getParam(url, param)
Returns the value of a named query parameter from a URL string, or null if the parameter is absent.
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"); // nullgetParam("https://example.com", "page"); // ""