# Reference

Every function, option, and type of both ports, and the rules that decide which pattern matches.

These pages state what patrun does, in full, for a reader who knows what they are looking for. The [how-to guides](https://rjrodger.github.io/patrun/how-to/) show the same in use.

- [How a match is chosen](https://rjrodger.github.io/patrun/reference/matching.html): Which patterns match a query, the order that decides between them, the forms of globs and intervals, and the order of a list.
- [What patterns and queries hold](https://rjrodger.github.io/patrun/reference/values.html): The keys and values a pattern and a query may have in each port, and what each function does with anything else.
- [JavaScript API](https://rjrodger.github.io/patrun/reference/javascript.html): The patrun function, its options, and every method of a router, in JavaScript.
- [TypeScript types](https://rjrodger.github.io/patrun/reference/typescript.html): The types the package exports, and what each one describes.
- [Go API](https://rjrodger.github.io/patrun/reference/go.html): The Go package's constructor, options, methods, and types, and where it differs from the JavaScript package.
