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

fix: make sure dates are correctly validated & parsed #639

Merged

Conversation

nickschot
Copy link
Contributor

fix: make sure dates are correctly validated
fix: make sure transform-keys doesn't recurse into a Date object

Proposed fix for #621

fix: make sure transform-keys doesn't recurse into a Date object
@codecov-io
Copy link

codecov-io commented Jan 16, 2017

Current coverage is 91.93% (diff: 100%)

Merging #639 into master will increase coverage by <.01%

@@             master       #639   diff @@
==========================================
  Files           179        179          
  Lines          1982       1984     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1822       1824     +2   
  Misses          160        160          
  Partials          0          0          

Powered by Codecov. Last update 00273c8...90a6948

Copy link
Contributor

@zacharygolba zacharygolba left a comment

Choose a reason for hiding this comment

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

Looks good. Just needs a test and one small change. Great work!

@@ -20,6 +20,7 @@ export function transformKeys<T: Object | Array<mixed>>(
return entries(source).reduce((result, [key, value]) => {
const recurse = deep
&& value
&& !(value instanceof Date)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this line to after the typeof value === 'object' check?

@zacharygolba
Copy link
Contributor

👏

@zacharygolba zacharygolba merged commit b7c66cb into postlight:master Jan 17, 2017
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

Successfully merging this pull request may close these issues.

3 participants