Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csv-loader

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-loader

A webpack module to intelligently load csv files.

  • 3.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27K
increased by0.46%
Maintainers
1
Weekly downloads
 
Created
Source

Webpack csv loader

NPM NPM Build Status

Purpose

This CSV loader automatically converts data types, making it easy to import and start using data.

Installation

Install with npm:

npm install --save-dev csv-loader

Usage

Add the csv-loader to your webpack configuration:

const config = {
  module: {
    rules: [
      {
        test: /\.csv$/,
        loader: 'csv-loader',
        options: {
          dynamicTyping: true,
          header: true,
          skipEmptyLines: true
        }
      }
    ]
  }
};

The loader will translate csv files into JSON, with the following settings:

  • automatically convert columns to the proper data type,
  • parse the CSV header
  • skip any blank lines in the file

Configuration

Any options supported by Papa Parse can be passed to this loader with the options object. The current Papa Parse API is available here.

Not just a CSV loader

This module works with any column based file separated by deliminators. Simply set which extension to parse and the loader will automatically figure out which deliminator to use by default. The deliminator can also be manually set.

Credits

Keywords

FAQs

Package last updated on 21 Jul 2022

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc