New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

upload-csv-svelte

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upload-csv-svelte

An uploader and parser for CSV files for Svelte

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Svelte CSV Upload

This creates an upload button that will either:

  • allow you to upload any file

  • take any CSV file and parse it into a Javascript array

  • take a Javascript array and parse as CSV

Usage

Plain Upload

Since there are no libraries for this and remembering how to bind things correctly can be a bother why not offer this:

import UploadCSV from 'upload-csv-svelte';

<UploadCSV allowedFileExtensions={['png', 'jpeg', 'gif']} onUpload={(file) => console.log("this is the uploaded file: ", file)} >

CSV Upload

import UploadCSV from 'upload-csv-svelte';

<UploadCSV onUpload={(file) => console.log("this is the parsed file: ", file)} />

CSV Parse

import UploadCSV from 'upload-csv-svelte';

<UploadCSV onUpload={(csvData) => console.log("this is the parsed data converted to CSV: ", csvData)} dataToCSV={[["hello", "nice"], ["convert", "to", "csv"]]} />

Suggestions are welcome

Open an issue on Github.

Keywords

Svelte

FAQs

Package last updated on 17 Jan 2020

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