Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

localstoragebooster

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localstoragebooster - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

localStorageDB.js

@@ -62,4 +62,4 @@ (function() {

win['ldb'] = ldb;
if (typeof Module !== 'undefined') {
Module.exports = ldb;
if (typeof module !== 'undefined') {
module.exports = ldb;
}

@@ -66,0 +66,0 @@

@@ -1,1 +0,1 @@

!function(){var r,i,e="undefined"!=typeof window?window:{},t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB;"undefined"==typeof window||t?((t=t.open("ldb",1)).onsuccess=function(e){r=this.result},t.onerror=function(e){console.error("indexedDB request error"),console.log(e)},t.onupgradeneeded=function(e){r=null,e.target.result.createObjectStore("s",{keyPath:"k"}).transaction.oncomplete=function(e){r=e.target.db}},e.ldb=i={get:function(e,t){r?r.transaction("s").objectStore("s").get(e).onsuccess=function(e){e=e.target.result&&e.target.result.v||null;t(e)}:setTimeout(function(){i.get(e,t)},50)},set:function(t,n,o){if(r){let e=r.transaction("s","readwrite");e.oncomplete=function(e){"Function"==={}.toString.call(o).slice(8,-1)&&o()},e.objectStore("s").put({k:t,v:n}),e.commit()}else setTimeout(function(){i.set(t,n,o)},50)}},"undefined"!=typeof Module&&(Module.exports=i)):console.error("indexDB not supported")}();
!function(){var r,i,e="undefined"!=typeof window?window:{},t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB;"undefined"==typeof window||t?((t=t.open("ldb",1)).onsuccess=function(e){r=this.result},t.onerror=function(e){console.error("indexedDB request error"),console.log(e)},t.onupgradeneeded=function(e){r=null,e.target.result.createObjectStore("s",{keyPath:"k"}).transaction.oncomplete=function(e){r=e.target.db}},e.ldb=i={get:function(e,t){r?r.transaction("s").objectStore("s").get(e).onsuccess=function(e){e=e.target.result&&e.target.result.v||null;t(e)}:setTimeout(function(){i.get(e,t)},50)},set:function(t,n,o){if(r){let e=r.transaction("s","readwrite");e.oncomplete=function(e){"Function"==={}.toString.call(o).slice(8,-1)&&o()},e.objectStore("s").put({k:t,v:n}),e.commit()}else setTimeout(function(){i.set(t,n,o)},50)}},"undefined"!=typeof module&&(module.exports=i)):console.error("indexDB not supported")}();
{
"name": "localstoragebooster",
"version": "2.0.0",
"version": "2.0.1",
"description": "Increase localStorage size 10 times or more! This tiny script uses bare minimum of IndexedDB to give you a simple key - value local storage system. It's asnychchronous so it's performance is also faster than native localStorage(in theory and this must be confirmed by testing)",
"main": "localStorageDB.min.js",
"scripts": {
"build": "uglifyjs -c -m -- localStorageDB.js > localStorageDB.min.js"
"build": "uglifyjs -c -m -- localStorageDB.js > localStorageDB.min.js",
"start": "http-server"
},

@@ -21,3 +22,6 @@ "repository": {

"uglify-js": "^3.15.0"
},
"dependencies": {
"http-server": "^14.1.0"
}
}

@@ -43,4 +43,4 @@ # localStorageDB

```javascript
!function(){var r,c,e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;e?(c={k:"",v:""},(e=e.open("d2",1)).onsuccess=function(e){r=this.result},e.onerror=function(e){console.error("indexedDB request error"),console.log(e)},e.onupgradeneeded=function(e){r=null,e.target.result.createObjectStore("s",{keyPath:"k"}).transaction.oncomplete=function(e){r=e.target.db}},window.ldb={get:function e(t,n){r?r.transaction("s").objectStore("s").get(t).onsuccess=function(e){e=e.target.result&&e.target.result.v||null,n(e)}:setTimeout(function(){e(t,n)},100)},set:function(e,t,n){c.k=e,c.v=t;let o=r.transaction("s","readwrite");o.oncomplete=function(e){"Function"==={}.toString.call(n).slice(8,-1)&&n()},o.objectStore("s").put(c),o.commit()}}):console.error("indexDB not supported")}();
!function(){var r,i,e="undefined"!=typeof window?window:{},t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB;"undefined"==typeof window||t?((t=t.open("ldb",1)).onsuccess=function(e){r=this.result},t.onerror=function(e){console.error("indexedDB request error"),console.log(e)},t.onupgradeneeded=function(e){r=null,e.target.result.createObjectStore("s",{keyPath:"k"}).transaction.oncomplete=function(e){r=e.target.db}},e.ldb=i={get:function(e,t){r?r.transaction("s").objectStore("s").get(e).onsuccess=function(e){e=e.target.result&&e.target.result.v||null;t(e)}:setTimeout(function(){i.get(e,t)},50)},set:function(t,n,o){if(r){let e=r.transaction("s","readwrite");e.oncomplete=function(e){"Function"==={}.toString.call(o).slice(8,-1)&&o()},e.objectStore("s").put({k:t,v:n}),e.commit()}else setTimeout(function(){i.set(t,n,o)},50)}},"undefined"!=typeof module&&(module.exports=i)):console.error("indexDB not supported")}();
```
```

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