Open source · Web & UX

URL State Contract Checker

Check query and hash state against a declared route contract.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

A URL is a public API that almost nobody writes down. A filter panel adds ?tag=a&tag=b, an analytics link bolts on utmsource, someone bookmarks ?page=007, a mail client re-encodes a query, and every one of these paths through the application has a different idea of what the link means. The failures are quiet: a repeated key silently resolves to the last value, an unknown key is dropped on the next navigation, a truncated percent escape turns into U+FFFD and gets stored as a search term.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

git clone https://github.com/edilec/url-state-contract-checker.git
cd url-state-contract-checker
node --version   # v22 or newer

Read the result

There is nothing to install. npm install is not required and adds nothing.

Where this check stops

Determinism, the full rule catalog, the declared limits and the reasons URLSearchParams is not used are documented in docs/url-state-contract.md.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.