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

Giving objects to writeToString with {headers: false} fails #63

Closed
TomGault opened this issue Sep 4, 2014 · 2 comments
Closed

Giving objects to writeToString with {headers: false} fails #63

TomGault opened this issue Sep 4, 2014 · 2 comments

Comments

@TomGault
Copy link

TomGault commented Sep 4, 2014

csv.writeToString(
  [
    {a: "a1", b: "b1"},
    {a: "a2", b: "b2"}
  ], {
      headers: true
  }, function (err, data) {
    console.log('err:', err, 'data: |' + data + '|');
  }
);

gives

err: null data: |a,b
a1,b1
a2,b2|

but

csv.writeToString(
  [
    {a: "a1", b: "b1"},
    {a: "a2", b: "b2"}
  ], {
      headers: false
  }, function (err, data) {
    console.log('err:', err, 'data: |' + data + '|');
  }
);

gives

err: null data: |
|
doug-martin added a commit to doug-martin/fast-csv that referenced this issue Sep 5, 2014
* Fixed issue with `writeToString` and `writeToPath` examples C2FO#64
* Fixed issue with creating a csv without headers C2FO#63
@doug-martin doug-martin mentioned this issue Sep 5, 2014
@doug-martin
Copy link
Contributor

This issue is fixed in v0.5.2 thanks for finding this

-Doug

@TomGault
Copy link
Author

TomGault commented Sep 5, 2014

Holy crap! Fixed, unit tested, documented and deployed in less than 24 hours! Nice work, dude!

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

2 participants