Skip to content

Conversation

Danieth
Copy link

@Danieth Danieth commented Mar 12, 2017

issues #6

Danieth added 2 commits March 12, 2017 15:15
* Replaced '99' with a numerical 0
* react-csv#6
* `header in object` should be a sufficient condition. The suggested
  `String(object[header])` wasn't passing the original tests - it caused
  keys that didn't exist on the object to be inserted as
  undefined. Checking if the key is in the object allows for falsy
  values, while preventing keys that haven't ever been set from leaking
  in.
* Should close issue react-csv#6
* react-csv#6
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 96.591% when pulling 486589d on Danieth:master into 8f4d0b5 on abdennour:master.

@abdennour abdennour merged commit d323141 into react-csv:master Mar 12, 2017
headers.map((header) =>
object[header] ? object[header] : ''))]
headers = headers || jsonsHeaders(jsons);
const data = jsons.map((object) => headers.map((header) => (header in object) ? object[header] : ''));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like it.. yes this is the best solution or also object.hasOwnProperty(header)

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