fix(adapter-commons): faster sorter#3495
Conversation
- check for 'null && undefined' in one if
- detect typeof only once
- move get fn outside
- check key.includes('.') before key.split('.')
- type compareNSB & compareString
Deploying feathers-dove with
|
| Latest commit: |
a30281f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1d8832bb.feathers.pages.dev |
| Branch Preview URL: | https://refactor-sorter.feathers.pages.dev |
|
This looks good, thank you. I wonder if there is a more generic package for this kind of thing. Doesn't seem to be something we should have to maintain ourselves - I took this from NeDB when it stopped being maintained. |
|
https://github.com/kofrasa/mingo could help. But I think it's fine. It's a small utility which is not a subject of change often and most adapters use I think we should not overcomplicate this. Or we end up importing and exporting from another library and their versioning has to align with our versioning. We have enough of these problems. |
|
True. It might be worth getting more test coverage for it eventually if we do want to keep it around. |
|
💯. I also thought about that. |
This is a small refactoring.