Socket
Socket
Sign inDemoInstall

cart-localstorage

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cart-localstorage - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

.browserslistrc

22

package.json
{
"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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc