Git Product home page Git Product logo

ucsv's Introduction

Ucsv.js: A JavaScript CSV Library

UCSV is a small library for importing and exporting CSV into and out of ECMAScript programs. CSV text can be imported into a multi-dimensional array or an array of objects if column headings are available. These structures can also easily be output as CSV text.

Features

  • MIT, GLP3 dual licensed
  • Simple, namespaced API
  • Small (less than 1.5kb when minified and gzipped)
  • When exporting to CSV appropriate fields are automatically quoted
  • Optionally strip leading and trailing whitespace from fields
  • Proper support for quotes, commas and line-breaks in quoted fields
  • Use in browser or as a CommonJS module.

Usage

Grab a copy of ucsv-x.x.x.min.js from the dist/ directory and include it in your project. If you would like sourcemap support, you will need to build the library your self with the grunt gz command and then grab ucsv-x.x.x.min.js.map and the ucsv_x.x.x_src directory as well.

Building Ucsv

Installing prerequisites

Getting/building Ucsv

  • Clone the Git repository git clone https://github.com/uselesscode/ucsv.git
  • In the cloned directory, run npm install, this will read package.json and install all of the dependencies needed to build ucsv.
  • Run grunt to build ucsv.

Build Options

grunt will run tests, jshint and then build a minified copy of the library in dist/ as well as documentation in docs/.

grunt gz will do everything that the default command does but it will also generated .gz compressed versions of the library and .map file.

grunt test will run the test suite on the source files without building.

grunt docs will just generate documentation.

grunt notest will build a copy of the library without linting or running tests

grunt keepconcat the default build will delete the non-minified version of the concatenated source, keepconcat will not.

grunt cleanup will remove the dist and docs directories.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.