@papb/json-excel
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "@papb/json-excel", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Create a pretty Excel table from JSON data with a very simple API", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -26,6 +26,14 @@ # @papb/json-excel [![Build Status](https://github.com/papb/json-excel/workflows/CI/badge.svg)](https://github.com/papb/json-excel/actions/workflows/ci.yml) | ||
#### Standard build | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@papb/json-excel@2.0.0/dist/browser/json-excel.min.js"> | ||
<script src="https://cdn.jsdelivr.net/npm/@papb/json-excel@2.0.1/dist/browser/json-excel.min.js" integrity="sha512-rR3G8juQnBDl4yDFhIu68uNUFzItiyJt6KPRE2L+WWlIW0acUwU4TaTm3sYqZqjTu/EAV9C4gxVnHZeLhP1iTg==" crossorigin="anonymous"></script> | ||
``` | ||
#### Modern build (ESM) | ||
<script src="https://cdn.jsdelivr.net/npm/@papb/json-excel@2.0.1/dist/browser/json-excel.min.modern.js" type="module" integrity="sha512-KN1VrgeqVNeOLd31soYodY38Na/Yw7WwQ3M73sFEGP20fd2vCw0BiPq4yfQTmYABoLFLeSl/hA0z/V0Zm2M/3A==" crossorigin="anonymous"></script> | ||
Note: you could omit this `<script>` declaration for ESM and just import the URL directly, [but you would miss the security given by Sub-Resource Integrity](https://stackoverflow.com/a/59853202/4135063). | ||
## Importing | ||
@@ -35,9 +43,18 @@ | ||
#### CommonJS syntax | ||
```js | ||
import { jsonToExcel, exportJsonToExcel } from '@papb/json-excel'; // ESM / TypeScript syntax | ||
const { jsonToExcel, exportJsonToExcel } = require('@papb/json-excel'); // CommonJS syntax | ||
const { jsonToExcel, exportJsonToExcel } = require('@papb/json-excel'); | ||
``` | ||
#### ESM / TypeScript syntax | ||
```js | ||
import { jsonToExcel, exportJsonToExcel } from '@papb/json-excel'; | ||
``` | ||
### Browsers | ||
#### Standard build | ||
```js | ||
@@ -47,2 +64,8 @@ const { jsonToExcel, exportJsonToExcel } = window.jsonToExcel; | ||
#### Modern build (ESM) | ||
```js | ||
import { jsonToExcel, exportJsonToExcel } from 'https://cdn.jsdelivr.net/npm/@papb/json-excel@2.0.1/dist/browser/json-excel.min.modern.js'; | ||
``` | ||
## Usage | ||
@@ -49,0 +72,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2366245
268
0