-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
order independent routing #250
base: master
Are you sure you want to change the base?
Conversation
Thank you for your submission! Like many open source projects, we ask that you sign our CLA (Contributor License Agreement) before we can accept your contribution. Already signed the CLA? To re-check, try refreshing the page. |
🦋 Changeset detectedLatest commit: db43d31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
fb382aa
to
ae11729
Compare
@@ -0,0 +1,326 @@ | |||
import { pathToRegexp } from 'path-to-regexp'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use .ts
file extension for files in this directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, good point. Let me change it to .ts
.
const hasOwnProperty = Object.prototype.hasOwnProperty; | ||
const MAX_CACHE_SIZE = 1000; | ||
|
||
function shallowEqual(objA: any, objB: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a copied from somewhere? I remember seeing something similar already in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a duplicate. I copied it because I want to keep the cache separate between the existing matchRoute and the order-independent matchRoute.
Thinking about it, I can create a factory function to avoid duplicated code. Let me do that.
This PR adds order-independent matchRoute.