Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
A lightweight CSV parser.
Run the following commands to download and install the application:
$ npm install a-csv
There is a command line tool as well and it's available if you install this package globally:
$ npm install -g a-csv
Run a-csv -h
for help content.
$ a-csv -h
Usage: a-csv [options]
Options:
-l, --length <length> The buffer size.
-c, --charset <charset> The file charset
-i, --ignore-headers Ignore the first line in the input file.
-s, --source <path> The source csv file.
--verbose Display additional log messages.
-h, --help Displays this help.
-v, --version Displays version information.
Examples:
a-csv -s path/to/file.csv
a-csv -s path/to/file.csv -i
a-csv -s path/to/file.csv -l 2048
a-csv -s path/to/file.csv -c ascii
Documentation can be found at https://github.com/jillix/a-csv
var CSV = require("a-csv");
var file = "test.csv";
var options = {
delimiter: ";",
charset: "win1250"
};
CSV.parse(file, options, function (err, row, next) {
if (err) {
return console.log(err);
}
if (row !== null) {
console.log(row);
return next();
}
console.log("finish");
});
parse(path, options, rowHandler)
Parses CSV files.
String path
: Path to CSV file.
Object options
: An object containing the following properties:
delimiter
(String): The CSV delimiter (default: ",").
length
(Number): The buffer size (default: 8 * 1024
).
charset
(String): The charset (default: "utf8"
).
headers
(Boolean): A flag to indicate if the file contains headers or not (default: false
).
Function rowHandler
: The row handler callback (called with err
, data
, next
arguments).
stringify(csvArray, delimiter, lineBreak)
Stringifies a CSV array.
csvArray
: The CSV array.delimiter
: The delimiter (default: ","
).lineBreak
: The line break delimiter (default: "\r\n"
).your-great-feature
.See the LICENSE file.
FAQs
A lightweight CSV parser.
The npm package a-csv receives a total of 0 weekly downloads. As such, a-csv popularity was classified as not popular.
We found that a-csv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.