
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
SimpleCSV.js is a fast and compact JavaScript CSV library for parsing csv strings, and parsing JSON table objects.
In any web page:
<script src="http://simplecsvjs.com/dist/simplecsv.0.0.47.standalone.min.js"></script>
<script>
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var parsedCsvdata = csv.parseString('Turing, 35, chess\nSamuel, 21, checkers');
</script>
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var parsedCsvdata = csv.parseString('Turing, 35, chess\nSamuel, 21, checkers');
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var jsonObj = csv.CSVToJSON('Planet Name, Color\nMars,red-orange\nUranus,light-blue',
{ hasHeaders: true });
console.log(jsonObj);
output is:
[{"Planet Name":"Mars"," Color":"red-orange"},{"Planet Name":"Uranus"," Color":"light-blue"}]
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var str = csv.JSONToCSV('[{"Planet Name":"Mars"," Color":"red-orange"},' +
'{"Planet Name":"Uranus"," Color":"light-blue"}]');
console.log(str);
output is:
Planet Name, Color
Mars,red-orange
Uranus,light-blue
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var cdata = csv.parseString('Planet Name, Color\nMars,red-orange\nUranus,light-blue', { hasHeaders: true });
for (var i = 0; i < cdata.rowCount; i++) {
for (var j = 0; j < cdata.columnCount; j++) {
console.log(cdata.rows[i][j]);
}
}
var simplecsv = require('simplecsv');
var csv = new simplecsv.csv();
var cdata = csv.parseString('Planet Name, Color\nMars\nred-orange, Uranus,light-blue', { hasHeaders: true });
console.log(csv.findErrors(cdata));
Install with npm.
$ npm install simplecsv
SimpleCSV.js uses \n
and \r\n
for newline when parsing. Currently there is no support for Mac's \r
for newline (i.e. universal mode in Python csv).
For bug reports, feature requests and general questions, please feel free to email baris@onehundredyearsofcode.com.
FAQs
Fast and compact CSV parser for parsing CSV with CSV to JSON support.
The npm package simplecsv receives a total of 16 weekly downloads. As such, simplecsv popularity was classified as not popular.
We found that simplecsv 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.