npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

alnilam

v0.9.2

Published

Stellar, statically typed, declarative routing for react.

Downloads

6

Readme

What / Why is Alnilam?

It's a fork of react-router-dom in TypeScript. You can find the differences to RR 5.0 here.

Motivations:

  1. No more split between core library and dom. This makes the whole thing a lot easier to understand.
  2. No more react native support. A necessity of point one, but also motivated by the low download count of RR native.
  3. Streamlining: Removing MemoryRouter, HashRouter, BrowserRouter. Those just wrapped <Router>.
  4. Break things the original can't because it would require major releases:
    • Dropping exports
    • Upping the minimum react version.
    • Changing key behaviors (like Route)
  5. Port the entire thing to typescript.
  6. Break from some minor decisions made for RR.

Ultimately, it's more about the learning experience. It's my first dabble with a library, typescript and publishing something on NPM. Alnilam also serves as my testbed for contributions back to RR.

Acknowlegdements

Thanks to all original contributors of React-Router.

Getting started:

You can find the documenation here.

npm i alnilam

// Minimal example using the browser history API.
import { Router, Switch, Route } from "alnilam";
import { createBrowserHistory } from "verlauf";

const myHistory = createBrowserHistory(/* consult the history documentation for your options here*/);

function MyRouter() {
  return (
    /* Setting up the router itself. */
    <Router history={myHistory}>
      {/* Switch will only render the first matching route: */}
      <Switch>
        {/* Defining the individual routes: */}
        <Route path="/" exact >
          <div> Epsilon Orionis </div>
        </Route>
        <Route path="/alnitak" >
          <div> Zeta Orionis </div>
        </Route>
        <Route path="/mintaka" >
          <div> Delta Orionis </div>
        </Route>
        <Route path="/ran" >
          <div> Home of Bill. </div>
        </Route>
      </Switch>
    </Router>
  );
}

Here is a a small example app made with Alnilam. It shows:

  • Nested routes
  • Basic use of <Match>, <Route>, <Link>, and <Switch>
  • Use of parameters in route declarations

TODO for 1.0

  • [x] Outline (or implement) API changes and refactorings for future work.
    • [x] Document the API differences properly in a separate document.
  • [ ] Figure out proper typing for withRouter()

Why is it called "Alnilam"?

Alnilam is a star that was used in celestial navigation. It's one of the stars in Orions belt - which happens to be my favorite constellation - and it's official designation is Epsilon Orionis. I'm also a fan of contrived package names ;-)