@concierge-auctions/csv-parser

0.0.2 • Public • Published

Most of the credit goes to csvtojson. This package is a thin wrapper on top of csvtojson tailored to our anticipated use cases.

Features

  • Promise API
  • Transform column names
  • Returns JS object or JSON string
  • Parse CSV from a string or file
  • Non-blocking (5-6ms ticks on average)
  • Don't lose the configurability of csvtojson

Future concerns:

  • Blocking for "data" path (split and reverse). The cost of this isn't terribly high, but could become a concern with larger datasets. (~70ms for 200k lines @ 25 columns)
  • columnNameMapper option (function) so that we could pass in a toCamelCase function or something.
  • columnTypeMapper map function for each value (integer for some columns, date for others)
  • Allow a stream to be passed in instead a string of filename Check out tests for usage examples

/@concierge-auctions/csv-parser/

    Package Sidebar

    Install

    npm i @concierge-auctions/csv-parser

    Weekly Downloads

    0

    Version

    0.0.2

    License

    GPL-3.0

    Last publish

    Collaborators

    • conciergeauctions
    • brad.decker
    • kt.stephans