Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
node-tsv-json
Advanced tools
convert tsv to json format.
npm install node-tsv-json
tsv = require("node-tsv-json");
tsv({
input: "sample.tsv",
output: "output.json"
//array of arrays, 1st array is column names
,parseRows: true
}, function(err, result) {
if(err) {
console.error(err);
}else {
console.log(result);
// [
// { 'date, 'close'},
// { '31-Jul-07', '131.76' },
// { '30-Jul-07', '141.43' },
// { '27-Jul-07', '143.85' },
// { '26-Jul-07', '146.00' },
// { '25-Jul-07', '137.26' },
// { '24-Jul-07', '134.89' },
// { '23-Jul-07', '143.70' },
// { '20-Jul-07', '143.75' }
// ]
}
});
In config object, you have to enter an input path. But If you don't want to output any file you can set to null
.
Add parseRows: true (optional)
to the config object to output an array of arrays where the first element is an array of column names followed by arrays of values. Like sample below:
[
[ 'date', 'close'],
[ '31-Jul-07', '131.76' ],
[ '30-Jul-07', '141.43' ],
[ '27-Jul-07', '143.85' ],
[ '26-Jul-07', '146.00' ],
[ '25-Jul-07', '137.26' ],
[ '24-Jul-07', '134.89' ],
[ '23-Jul-07', '143.70' ],
[ '20-Jul-07', '143.75' ]
]
MIT @chilijung
FAQs
convert tsv to json
We found that node-tsv-json 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
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.