find-my-way-ts is a highly performant, framework-independent HTTP router designed for Node.js environments, leveraging a Radix Tree (also known as a compact Prefix Tree) for extremely fast route matching. It is a TypeScript-first fork of the popular `find-my-way` router, providing enhanced type safety and improved developer experience through its explicit type definitions. Currently at version 0.1.6, the package appears to be under active development, with frequent patch releases addressing bug fixes and minor enhancements, such as improved URI error handling and `QueryString` module integration. Its primary differentiator is its speed and efficient algorithm for path resolution, supporting route parameters and wildcards, making it suitable for high-throughput HTTP servers. Its pre-1.0 status suggests a relatively fast-moving API, though the current changes are mostly iterative improvements.
npm install find-my-way-tsVerified import paths — ran on the pinned version, not inferred.
This quickstart sets up a basic HTTP server using `find-my-way-ts` to route incoming requests. It demonstrates GET routes with and without parameters, a POST/PUT route with body parsing, and accessing query parameters. It uses Node.js's native `http` module for server creation.
Always review the release notes (`CHANGELOG.md`) when upgrading and lock package versions in `package.json` to specific patch releases (e.g., `"find-my-way-ts": "~0.1.6"` or `"find-my-way-ts": "0.1.6"`).
Upgrade to `find-my-way-ts@0.1.6` or newer to benefit from improved URI error handling and stability.
Ensure you are using `find-my-way-ts@0.1.4` or newer to avoid `new Function`-related issues and ensure broader runtime compatibility.
Refer to the `find-my-way-ts` documentation and source code for the most accurate and up-to-date API specifics and behavioral guarantees, rather than relying solely on `find-my-way` knowledge.
Carefully review and test complex regex-based routes for potential ReDoS attack vectors. Monitor `find-my-way-ts`'s security advisories and ensure regular updates to mitigate known vulnerabilities.
Ensure you are using ESM `import { findMyWay } from 'find-my-way-ts';` and that your build/runtime environment supports ESM. If using Node.js, ensure your package.json `type` is set to `module` or use `.mjs` extension for your file.Upgrade to `find-my-way-ts@0.1.6` or newer. If the issue persists with valid URIs, ensure client-side URI encoding is correct or implement custom URL sanitization before passing to the router.
Upgrade to `find-my-way-ts@0.1.2` or newer, which includes a fix for `searchParams` types. Ensure your `tsconfig.json` targets a modern TypeScript version.
Upgrade to `find-my-way-ts@0.1.4` or newer. This version specifically removed the usage of `new Function` to enhance compatibility with such runtimes.
No dependency data recorded yet.