Closed jaulz closed 3 years ago
Thanks, Jaul. Can you as well update the readme? Showing usage examples and updating unit tests count.
@nepsilon here you go. Number of unit tests stays the same since every existing test is a test for stringify
at the same time.
@nepsilon anything else you need? 😊
I should be able to test and merge later next week. Thanks for your contrib!
@nepsilon great! Let me know if you need anything from my side.
Does this keep the order of the original string? Just reading through the changed README.md, it seems like adding a new keyword reshuffles the original searchQuery, moving text to the front of the string and inserting the new keyword somewhere in the middle instead of the end?
Any reason that this still hasn't been merged?
I'd rather not have to pass in the options to get a usable string
Been a while, but any chance this will be merged or should I just fork it?
@sam-jg Thanks for the reminder. I merged this (along with some other MR). Tests are all green. I also bumped dev dependencies and re-generated the lock file.
A new version has been published (v1.6.0
).
Amazing thanks!
This PR will add a stringify function which can convert a parsed search query object to a string. I added a part to every test where the parsed search query is stringified and parsed again. If the object equals the previous parsed object (except for the offsets) we can consider it as successful.