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.
csv-exporter-utility
Advanced tools
CSV Exporter Utility is a simple, yet powerful package that allows you to easily convert a JSON array of data into a CSV file and download it in a user-friendly way. This utility is highly useful when you need to export data from a web application or API to a CSV file format, which can then be imported into other tools or processed further.
npm install csv-exporter-utility
downloadCSVFile
function from the package:import { downloadCSVFile } from "csv-exporter-utility";
downloadCSVFile
function in your application to convert and download JSON data as a CSV file. You can also pass an array of property names to omit certain fields from the CSV:const jsonData = [
{ id: 1, name: "John Doe", email: "john@example.com" },
{ id: 2, name: "Jane Doe", email: "jane@example.com" },
];
// Omit the "email" field from the CSV
downloadCSVFile(jsonData, "users", ["email"]);
In the above example, the email
field is omitted from the downloaded users.csv
file.
You can also omit nested properties using dot notation:
// Omit the "user.age" field from the CSV
downloadCSVFile(jsonData, "users", ["user.age"]);
This will omit the age
field inside the user
object, allowing more control over complex JSON data structures.
Use CSV Exporter Utility when you need to:
CSV Exporter Utility is written in TypeScript and has no external dependencies. However, you need to ensure that your project uses TypeScript and has the necessary TypeScript configuration in place.
To use this package, your project should have the following:
tsconfig.json
fileFor more information on setting up TypeScript in your project, please refer to the official TypeScript documentation.
This project is licensed under the MIT License. You are free to use, modify, and distribute this package, provided that you include the copyright notice and the license text. For more information, please see the LICENSE file.
CSV Exporter Utility is developed and maintained by Arslan Ameer. If you have any questions or need help, feel free to open an issue on the GitHub repository.
Contributions to CSV Exporter Utility are welcome and greatly appreciated! If you would like to contribute, please follow these steps:
Please make sure to follow the existing coding style and add tests for any new features or bug fixes. Your contributions will be reviewed and, if approved, merged into the main repository.
Thank you for your interest in contributing to CSV Exporter Utility!
New Features:
omitProperties
parameter."user.age"
will omit the age
field from the user
object).Improvements:
Bug Fixes:
v1.1.0 - [September 7, 2024]
New Features:
omitProperties
parameter."user.age"
will omit the age
field from the user
object).Improvements:
Bug Fixes:
FAQs
Downloads a CSV file from given JSON data
The npm package csv-exporter-utility receives a total of 0 weekly downloads. As such, csv-exporter-utility popularity was classified as not popular.
We found that csv-exporter-utility demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
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.