cart-localstorage
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "cart-localstorage", | ||
"version": "1.1.1", | ||
"description": "Tiny shopping cart on top of LolcalStorage - ES6, < 1Kb, test coverage", | ||
"version": "1.1.2", | ||
"description": "Tiny shopping cart on top of LolcalStorage - ES6, < 1Kb, full test coverage", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "jest", | ||
"build": "rollup index.js --file dist/cart-localstorage.js --format iife --name cartLS" | ||
"build": "rollup -c" | ||
}, | ||
@@ -29,8 +29,14 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.4.0", | ||
"@babel/preset-env": "^7.4.1", | ||
"babel-loader": "^8.0.5", | ||
"@babel/core": "^7.5.5", | ||
"@babel/plugin-transform-runtime": "^7.5.5", | ||
"@babel/preset-env": "^7.5.5", | ||
"@babel/runtime": "^7.5.5", | ||
"babel-loader": "^8.0.6", | ||
"jest": "^24.5.0", | ||
"rollup": "^1.7.4" | ||
} | ||
"rollup": "^1.26.4", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-babel-minify": "^9.1.1" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -25,9 +25,9 @@ # cart-localstorage | ||
OR use the bundled version: | ||
OR use the bundled version (via CDN): | ||
```html | ||
<script src="cart-localstorage.js"></script> | ||
<script src="https://unpkg.com/cart-localstorage@1.1.2/dist/cart-localstorage.min.js" type="text/javascript"></script> | ||
``` | ||
## Example | ||
@@ -34,0 +34,0 @@ |
@@ -10,3 +10,3 @@ const STORAGE_KEY = '__cart' | ||
localStorage.setItem(key || STORAGE_KEY, JSON.stringify(data)); | ||
if(saveListener) saveListener(get(key || STORAGE_KEY)) | ||
if(saveListener) saveListener(list(key || STORAGE_KEY)) | ||
} | ||
@@ -16,3 +16,3 @@ | ||
localStorage.removeItem(key || STORAGE_KEY) | ||
if(saveListener) saveListener(get(key || STORAGE_KEY)) | ||
if(saveListener) saveListener(list(key || STORAGE_KEY)) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
22116
11
10
217