Skip to content
This repository was archived by the owner on May 1, 2021. It is now read-only.

Conversation

@metamn
Copy link
Contributor

@metamn metamn commented Dec 21, 2019

This patch is related to pbeshai/use-query-params#67

I've added a test in src/__tests__/serialize-test.ts
And I've modified code in src/serialize.ts

Thank you!

Copy link
Owner

@pbeshai pbeshai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for doing this, but you've included a lot of extra changes in this PR. Sorry I neglected to include a .prettierrc in this repo, but the desired settings are:

{ "trailingComma": "es5", "singleQuote": true, "printWidth": 80 }

Or you can just turn off your auto-formatting and make your change look similar (you're currently modifying almost every line)

Also there is no yarn.lock file in this repo, please do not add one.

@metamn
Copy link
Contributor Author

metamn commented Dec 23, 2019

I've just reformatted the code with your suggestions ... and added yarn.lock to .gitignore ... Hope all's well now

@pbeshai pbeshai merged commit 34381f4 into pbeshai:master Jan 7, 2020
@pbeshai
Copy link
Owner

pbeshai commented Jan 7, 2020

FYI the yarn.lock file was still there and I ended up simplifying the code:

const keyValSeparatorRegExp = new RegExp(`${keyValSeparator}(.+)`); objStr.split(entrySeparator).forEach(entryStr => { const [key, value] = entryStr.split(keyValSeparatorRegExp); obj[key] = value === '' ? undefined : value; });

Will be available in 0.2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants