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.
datakit
Advanced tools
Readme
Simple toolkit for reading and writing data CSV and JSON files in JavaScript and TypeScript under Node.js.
Install using npm:
npm install --save datakit
Install globally for the command line tools:
npm install -g datakit
Ready to see some code?
Here's an example of transforming a CSV file using JavaScript:
const { readCsv, writeCsv } = require("datakit");
function transform(record) {
// Your function to transform a data record.
}
async function main() {
const data = await readCsv("./some/file.csv");
const transformed = data.map(transform);
await writeCsv("./an/output/file.csv", transformed);
}
main()
.then(() => console.log("Done"))
.catch(err => {
console.error("Something went wrong.");
console.error(err && err.stack || err);
});
Here's a similar code example using TypeScript.
This time we are reading and writing JSON files:
import { readJson, writeJson } from "datakit";
function transform(record: InputT): OutputT {
// Your function to transform a data record.
}
async function main(): Promise<void> {
const data = await readJson("./some/file.json");
const transformed = data.map(transform);
await writeJson("./an/output/file.json", transformed);
}
main()
.then(() => console.log("Done"))
.catch(err => {
console.error("Something went wrong.");
console.error(err && err.stack || err);
});
You can also read and write YAML files using similar functions.
Consider using Data-Forge for data transformation, analysis and visualization in JavaScript and TypeScript.
FAQs
Simple JavaScript toolkit for data transform across JSON, CSV and YAML.
The npm package datakit receives a total of 11 weekly downloads. As such, datakit popularity was classified as not popular.
We found that datakit demonstrated a healthy version release cadence and project activity because the last version was released less than 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.