Socket
Socket
Sign inDemoInstall

space-router

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    space-router

All the routing essentials.


Version published
Weekly downloads
171
decreased by-47.06%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.9.2

  • Upgrade all depedencies.

Readme

Source

space router logo, a skeleton floating in space

Space Router

Framework agnostic router for single page apps

Space Router packs all the features you need to keep your app in sync with the url. It's distinct from many other routers in that there is only a single callback. This callback can be used to re-render your applocation, update a store and perform other actions on each url change. Space Router is stateless, it doesn't store the current route leaving state completely up to you to handle.

In summary, Space Router:

  • listens to url changes using popstate or hashchange event
  • extracts url parameters and parses query strings
  • supports nested routes and arbitrary route metadata
  • fits into a wide range of application architectures and frameworks
  • has no dependencies and weighs less than 2kb

Install

npm i space-router

API

See the API Docs for more details.

Keywords

FAQs

Last updated on 05 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc