Skip to content

dmaslov/csv-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<csv-preview> Build Status

A Polymer element to preview csv data and structured data (array of map) in table format

Demo

Check it live.

Installation

Install using Bower:

 bower install csv-preview

Usage

  • Import Polyfill Web Components support for older browsers:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
  • Import Custom Element:
<link rel="import" href="bower_components/csv-preview/csv-preview.html">
  • Start using it!(need to pass raw csv data somehow into element. Investigate index.html to see exmple)

  • If column separator of csv data is not comma, pass it in separator attribute. The separator attribute is not required, you may remove it if column delimeter is comma (by default)

<csv-preview data="" separator=""></csv-preview>

Options

Attribute Options Default Description
data string `` raw csv data (comma delimied by default)
separator string , column separator (",", ";", etc)

Tests

npm install -g web-component-tester
wct

License

MIT License