New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

big-csv

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

big-csv

An uncomplicated CSV reader for working with big CSV files.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Big CSV

NPM Version NPM Downloads Node.js Version Build Status Coverage Status Gittip

An uncomplicated CSV library (parser and serializer) that works with big CSV files. This writes and reads individual lines instead of the entire file so that you don't have to load the entire CSV file into memory. It works at the moment but I'm still hashing out the scalability of it.

Install

npm install big-csv or yarn add big-csv


id,name,weight,description,inventory.amount,inventory.price
1,Apple,23.25,"A red fruit",5,1.25
2,Orange,19.68,"An orange colored round fruit",9,2.30

Reading

const CSV = require('big-csv')

let csv = new CSV('fruit.csv')
csv.read().then(console.log)

Outputs:

[
    {
        "id": 1,
        "name": "Apple",
        "weight": 23.25,
        "description": "A red fruit",
        "inventory": {
            "amount": 5,
            "price": 1.25
        }
    },
    {
        "id": 2,
        "name": "Orange",
        "weight": 19.68,
        "description": "An orange colored round fruit",
        "inventory": {
            "amount": 9,
            "price": 2.30
        }
    }
]

Writing

csv.write({
    "id": 3,
    "name": "Watermelon",
    "weight": 100.5,
    "description": "A strange green spherical type blob",
    "inventory": {
        "amount": 9232,
        "price": -252.00
    }
}).then(_ => {
    console.log('wrote object to csv')
})

Creates the CSV, using the object's property names as a header, and appends a row to the CSV:

3,Watermelon,100.5,"A strange green spherical type blob",9232,-252.00

FAQs

Package last updated on 29 Jan 2017

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