Comments (9)
This is on node v0.10.26, btw.
from csv2array.
Weird, maybe I should have tested a little bit. Looking into it...
from csv2array.
Should be fixed now.. update to latest version.
from csv2array.
Not quite there yet:
"r1c1", "r1c2"
"r2c1", "r2c2"
Produces:
[ [ 'r1c1', ' "r1c2"' ],
[ 'r2c1', ' "r2c2"' ] ]
from csv2array.
I've tried parsing your csv with a couple of parsers and they all seem to not handle it properly because of the spaces... What code produced that CSV? Are you sure it is valid?
from csv2array.
According to https://code.google.com/p/jquery-csv/issues/detail?id=21
"According to the CSV spec, whitespace contained outside of a proper delimiter is considered illegal."
from csv2array.
I wrote it by hand for a test case on rechoir (for eventual use within grunt, gulp etc via liftoff). You're correct, this is an invalid CSV format. We're all good here!
from csv2array.
ps: thanks!
from csv2array.
Ok, by the way, I've added a skipwhitespace option which seems to work for your csv data but I haven't tested it much.
csv2array(str, { skipwhitespace: true });
from csv2array.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csv2array.