Socket
Book a DemoInstallSign in
Socket

@imrandil/csv_to_json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imrandil/csv_to_json

A simple npm package for generating json file (.json) from CSV file.

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

CSV to JSON Converter

A simple npm package for generating a JSON file (.json) from a CSV file.

Installation

You can install the package via npm:

npm install @imrandil/csv_to_json

Usage

const convertCSVtoJSON = require('@imrandil/csv_to_json');

const csvFilePath = 'example.csv';
const jsonFilePath = 'output.json';

(async () => {
    try {
        await convertCSVtoJSON(csvFilePath, jsonFilePath);
        console.log('CSV converted to JSON. JSON file saved:', jsonFilePath);
    } catch (error) {
        console.error('Error converting CSV to JSON:', error);
    }
})();

API

convertCSVtoJSON(csvFilePath, jsonFilePath)

Converts a CSV file to a JSON file.

  • csvFilePath (string): The path to the CSV file.
  • jsonFilePath (string): The path to save the JSON file.

Returns a Promise that resolves when the conversion is complete.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

csv

FAQs

Package last updated on 18 May 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.