Skip to content
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

Expose functions to manually parse cookies #40

Open
bjoluc opened this issue Jul 23, 2022 · 1 comment
Open

Expose functions to manually parse cookies #40

bjoluc opened this issue Jul 23, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@bjoluc
Copy link
Owner

bjoluc commented Jul 23, 2022

@bjoluc I was thinking that it would be nice if we can expose decompressFromEncodedURIComponent so that we don't need to install lz-string on our project to decode the cookie data. Is this possible ?

Originally posted by @bryantobing12 in #17 (comment)

@bryantobing12 Thanks, agree! I'd like to have two functions, one for compressed and one for non-compressed cookies. I'd also include JSON.parse in the exposed methods, unless there's a reason not to do so?

@bjoluc bjoluc added the enhancement New feature or request label Jul 23, 2022
@bjoluc
Copy link
Owner Author

bjoluc commented Aug 14, 2022

Reconsidering this in the light of #41, it may be nice to make this config-aware, something like

function getSubtreeFromCookie(middlewareConfig: NextReduxCookieMiddlewareConfig, subtree: string, context?: ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant