Socket
Socket
Sign inDemoInstall

svelte-csv

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

LICENSE

2

package.json
{
"name": "svelte-csv",
"version": "1.1.0",
"version": "1.2.0",
"description": "svelte-csv is the fastest in-browser CSV (or delimited text) parser for Svelte. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.",

@@ -5,0 +5,0 @@ "author": "Bunlong",

@@ -21,2 +21,3 @@ # svelte-csv

* CSVDownloader
* readString

@@ -28,2 +29,85 @@ * readRemoteFile

### 🎀 CSVDownloader
If you want to open your CSV files in Excel, you might want to set `bom={true}` or `bom`, default is `false`. This option adds the so called BOM byte `'\ufeff'` to the beginning of your CSV files and tells Excel that the encoding is UTF8.
#### Link
```javascript
import { CSVDownloader } from 'svelte-csv';
<CSVDownloader
data={[
{
"Column 1": "1-1",
"Column 2": "1-2",
"Column 3": "1-3",
"Column 4": "1-4",
},
{
"Column 1": "2-1",
"Column 2": "2-2",
"Column 3": "2-3",
"Column 4": "2-4",
},
{
"Column 1": "3-1",
"Column 2": "3-2",
"Column 3": "3-3",
"Column 4": "3-4",
},
{
"Column 1": 4,
"Column 2": 5,
"Column 3": 6,
"Column 4": 7,
},
]}
filename={'filename'}
bom={true}
>
Download
</CSVDownloader>
```
#### Link
```javascript
import { CSVDownloader } from 'svelte-csv';
<CSVDownloader
data={[
{
"Column 1": "1-1",
"Column 2": "1-2",
"Column 3": "1-3",
"Column 4": "1-4",
},
{
"Column 1": "2-1",
"Column 2": "2-2",
"Column 3": "2-3",
"Column 4": "2-4",
},
{
"Column 1": "3-1",
"Column 2": "3-2",
"Column 3": "3-3",
"Column 4": "3-4",
},
{
"Column 1": 4,
"Column 2": 5,
"Column 3": 6,
"Column 4": 7,
},
]}
type={'button'}
filename={'filename'}
bom={true}
>
Download
</CSVDownloader>
```
### 🎀 readString

@@ -30,0 +114,0 @@

export { readString } from './readString.svelte';
export { jsonToCSV } from './jsonToCSV.svelte';
export { readRemoteFile } from './readRemoteFile.svelte';
import CSVDownloader from './CSVDownloader.svelte';
export { CSVDownloader };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc