Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
comma-separated
Advanced tools
Simple CSV serialization
Simple CSV serialization mirroring JSON.parse and stringify. This follows RFC 4180 rules, and only handles commas as delimiters. This is not a general parser for any character-delimited format.
The api is very similar to the native JSON object in JavaScript.
CSV.parse(csvString [, reviver ])
csvString
is a well-formated string of csv data.
reviver
is an optional function that takes the row index, column index, and
cell string value. The function should return the desired value for that cell.
The reviver
is an opportunity to to do extra parsing from a cell's string
format. For example if the string matches an iso date format, you may want to
have a Date object instead of the raw string in the final array.
The default reviver
simply returns the field's string value.
CSV.stringify(tableArray [, replacer])
tableArray
is a 2 dimensional array of values to stringify.
replacer
is an optional function that takes the row index, column index, and
cell string value. The function should return a string value for that cell.
The replacer
is an opportunity to do a custom string format for particular
cells. This is useful if you have objects for cell values that do not have a
desirable toString
function.
The default replacer
simply converts to a string. (ie: '' + value
)
2.0.1 (2019-02-21)
<a name="2.0.0"></a>
FAQs
Simple CSV serialization mirroring JSON.parse and stringify.
The npm package comma-separated receives a total of 187 weekly downloads. As such, comma-separated popularity was classified as not popular.
We found that comma-separated demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.