Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
indian-ocean
Advanced tools
Readme
A Node.js library for reading in and writing out data plus some other useful filesystem functions.
Currently supports:
csv
tsv
psv
text
json
dbf
aml
- ArchieMLPlus a number of file system convenience functions.
npm install --save indian-ocean
var io = require('indian-ocean')
var json_data = io.readDataSync('path/to/data.csv')
console.log(json_data)
/*
[
{
"name": "Gerald",
"city": "Los Angeles"
},
{
"name": "Marcy",
"city": "Tuscaloosa"
}
]
*/
io.writeDataSync('path/to/save/output.json', json_data, { indent: 2 })
Or, combine methods to read in a directory of csvs as json:
var io = require('indian-ocean')
// Let's say this directory contains two csvs, each with two rows like the above example
var csvs = io.readdirFilterSync('csvs-folder', { include: 'csv', fullPath: true }).map(io.readDataSync)
console.log(csvs)
/*
[
[
{
"name": "Gerald",
"city": "Los Angeles"
},
{
"name": "Marcy",
"city": "Tuscaloosa"
}
],
[
{
"name": "Liza",
"city": "Minneapolis"
},
{
"name": "Eileen",
"city": "Mobile"
}
]
]
*/
// Concatenate them into one file with Javascript's Array.flat() method and write out one combined csv
io.writeDataSync('single-file.csv', csvs.flat())
/*
name,city
Gerald,Los Angeles
Marcy,Tuscaloosa
Liza,Minneapolis
Eileen,Mobile
*/
MIT
FAQs
A library for reading in and writing out data in Node.js.
The npm package indian-ocean receives a total of 31 weekly downloads. As such, indian-ocean popularity was classified as not popular.
We found that indian-ocean 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.