Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
file-line-parse
Advanced tools
Parse a propery delimited file, line-by-line, and return a Javascript array with object representations
Parse a property delimited file, line-by-line, and return the line in a JavaScript array in object representation.
fileLineParse(📄) => [ {}, {}, {} ]
$ npm install --save file-line-parse
OR $ yarn add file-line-parse
// CATS_DATA.csv:
// Bubbles,Persian,24,honey-brown
// Garfield,Tabby,33,orange with stripes
const fileLineParse = require('file-line-parse');
const input = './data/CATS_DATA.csv';
const keys = [ 'name', 'breed', 'age', 'color'];
fileLineParse(input, keys)
.then(cats => {
console.log(cats[0])
// { name: 'Bubbles', breed: 'Persian', age: '24', color: 'honey-brown' }
console.log(cats[1])
// { name: 'Garfield', breed: 'Tabby', age: '33', color: 'orange with stripes' }
});
Return a set
of parsed objects dictacted by sequence of keys
<string>
Path to file to be input.
<array>[<string> | <int>]
An array of keys to serve as mapping for object creation.
<object>
<string>
Specify the delimiter to be used. Default: ","
:arrows_counterclockwise: objects-to-file - Create a delimited value, output file from an array of objects.
MIT
FAQs
Parse a propery delimited file, line-by-line, and return a Javascript array with object representations
We found that file-line-parse 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.