json-to-csv-in-browser
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "json-to-csv-in-browser", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "This converts the json array in the browser to csv file that can be stored in disc", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"dev" : "tsc -p ." | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -1,1 +0,45 @@ | ||
# json-to-csv-in-browser | ||
# json-to-csv-in-browser | ||
This module creats the csv file inside the browser itself | ||
supply jsonarray it will give back file of csv | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<h1>Test</h1> | ||
<button id="btn">Click</button> | ||
</body> | ||
<script type="module"src="client.js" ></script> | ||
</html> | ||
``` | ||
```javascript | ||
import {JsonArray, download} from "json-to-csv-in-browser" | ||
mybtn = document.getElementById("btn").addEventListener("click",()=>{ | ||
let arr = [ | ||
{name : `umesh, bilsgai | ||
sghg | ||
susuus`, age : 53}, | ||
{name : "ramya", age : 38}, | ||
{name : "pradyu", age : 22} | ||
] | ||
let jsonArray = new JsonArray(arr); | ||
let str = jsonArray.convertToCSVstring(); | ||
download("my.csv", str); | ||
}) | ||
``` |
@@ -7,4 +7,4 @@ { | ||
// "incremental": true, /* Enable incremental compilation */ | ||
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ | ||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ | ||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ | ||
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ | ||
// "lib": [], /* Specify library files to be included in the compilation. */ | ||
@@ -11,0 +11,0 @@ // "allowJs": true, /* Allow javascript files to be compiled. */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
15788
19
160
0
45