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

Stripping dates #7

Open
drewmutt opened this issue Jan 28, 2019 · 2 comments
Open

Stripping dates #7

drewmutt opened this issue Jan 28, 2019 · 2 comments

Comments

@drewmutt
Copy link

drewmutt commented Jan 28, 2019

The library appears to strip dates from the values of the object.

let thing = {time:new Date()}; let transformed = deepMapKeys(thing, item=>item); console.log(thing); console.log(transformed);

The "time" value comes back blank.

@mcmath
Copy link
Owner

mcmath commented Jan 29, 2019

The reason is because Date is not a primitive, so it tries to go through the values of the Date and transform its keys. This is probably not the behavior most users expect. I'm going to add a feature that allows users to customize whether or not an object gets transformed. I'll probably also change the default behavior so that Date does not get transformed.

Thanks for raising the issue.

@romgrk
Copy link

romgrk commented Feb 10, 2020

ETA?

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

No branches or pull requests

3 participants