Skip to content

Adding support for reading CSV files.#4

Open
vote539 wants to merge 4 commits into
stevetarver:masterfrom
vote539:csv-support
Open

Adding support for reading CSV files.#4
vote539 wants to merge 4 commits into
stevetarver:masterfrom
vote539:csv-support

Conversation

@vote539
Copy link
Copy Markdown

@vote539 vote539 commented Aug 28, 2016

I added support for reading CSV files. This will provide better support for users who want to use this module with the option of the alternative spreadsheet format. The changes are as follows:

  1. Added dependencies on mime for detecting file type and csv-parse for parsing CSV files.
  2. Added a test case to ensure that row-oriented.xlsx parses to the same JSON as row-oriented.csv.
  3. Replaced the row-oriented.csv failure test case with a GIF file.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 0c680ac on vote539:csv-support into 3830613 on stevetarver:master.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 28, 2016

Current coverage is 100% (diff: 100%)

Merging #4 into master will not change coverage

@@           master    #4   diff @@
===================================
  Files           1     1          
  Lines          78   116    +38   
  Methods         1     1          
  Messages        0     0          
  Branches       17    21     +4   
===================================
+ Hits           78   116    +38   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update 3830613...1e76897

Updating async API to be fully async and not use the deprecated fs.existsSync function.
Changing errors to use Error class instead of strings.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-14.05%) to 85.95% when pulling afa253d on vote539:csv-support into 3830613 on stevetarver:master.

@vote539
Copy link
Copy Markdown
Author

vote539 commented Aug 28, 2016

In addition to the basic CSV support, I added a synchronous API to my branch (including tests and documentation). Note that since the dependency "excel" does not expose a synchronous API, right now the synchronous API does not support XLSX files.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.9%) to 99.138% when pulling 14e7bdd on vote539:csv-support into 3830613 on stevetarver:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.9%) to 99.138% when pulling 2609450 on vote539:csv-support into 3830613 on stevetarver:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 1e76897 on vote539:csv-support into 3830613 on stevetarver:master.

@vote539
Copy link
Copy Markdown
Author

vote539 commented Aug 29, 2016

FYI, for the time being I have made my changes available via the npm package "@vote539/excel-as-json"

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.

4 participants