Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

routr

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

routr - npm Package Versions

13

2.0.0

Diff

Changelog

Source

2.0.0

Breaking Changes

  • [#33] getRoute will now decodeURIComponent route values, you might need to remove decodeURIComponent from your route actions if you were supporting extended characters manually in your routes.
mridgway
published 1.0.0 •

Changelog

Source

1.0.0

Breaking Changes

  • [#29] navigate is no longer used as part of router.getRoute options
  • [#29] route.navigate has been removed from the matched route object

Features

  • [#30] Route definitions should now be defined as an array of route objects rather than a map of routes. The old method of defining routes with a map is still supported, but ordering can not be guaranteed (as per the JavaScript engine's implementation).
  • [#31] Added support for parsing and constructing urls with query strings. Matched route objects now contain a query property containing the map of query parameters. router.makePath now accepts a third query parameter which is a map of query parameters to add to the resulting URL string. e.g. router.makePath('home', {}, { foo: 'bar' }); will result in /?foo=bar. Query strings are generated using the query-string npm module, but can be customized by adding the options.queryLib to the Router constructor. The replacement should have a parse and stringify method similar to query-string. An example replacement would be qs.
  • [#32] Allow routes to match multiple HTTP methods by using an array for the route.method attribute. By default, routes with an undefined method will match ANY method.
lingyan
published 0.1.3 •

Changelog

Source

0.1.3

Features

  • [#27] Support for array paths with parameter name collision
lingyan
published 0.1.2 •

Changelog

Source

0.1.2

Internal

  • Replace reverand with path-to-regexp for creation of paths
lingyan
published 0.1.1 •

Changelog

Source

0.1.1

Features

  • [#22] Make route methods case-insensitive
lingyan
published 0.1.0 •

Changelog

Source

0.1.0

Breaking Change

  • Renamed "path" field to "url" in the return object of getRoute()
lingyan
published 0.0.5 •

Changelog

Source

0.0.5

Features

  • Freeze route objects in non-production environments
lingyan
published 0.0.4 •

Changelog

Source

0.0.4

Features

  • Allow matching paths containing query strings
mridgway
published 0.0.3 •

Changelog

Source

0.0.3

Features

  • Updated dependencies
lingyan
published 0.0.2 •

Changelog

Source

0.0.2

Features

  • [#2] Introduction of navigate property under route
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc