
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
cordova-plugin-indexeddb-async
Advanced tools
Install via the Cordova CLI.
For Cordova CLI 4.x, use the GIT URL syntax:
cordova plugin add https://github.com/ABB-Austin/cordova-plugin-indexeddb-async.git
For Cordova CLI 5.x, use the new npm syntax:
cordova plugin add cordova-plugin-indexeddb-async
Cordova will automatically load the plugin and run it. So all you need to do is use IndexedDB just like normal.
This plugin supports ios, android, and windows (phone and desktop), as well as the new browser platform.
Android 4.3 and earlier do not support IndexedDB, so this plugin will automatically add IndexedDB support. On Android 4.4 and later, the plugin does nothing, since IndexedDB is already natively supported.
All modern browsers natively support IndexedDB, so the plugin won't do anything. But for older browsers that support WebSQL, this plugin will automatically add IndexedDB support.
iOS 7 and earlier do not support IndexedDB, so this plugin will automatically add IndexedDB support. On iOS 8 and later, the plugin does nothing, since IndexedDB is already natively supported.
iOS 8's implementation of IndexedDB is very buggy. So, you may want to use this plugin rather than the native implementation. To do that, add the following line of code to your app:
window.shimIndexedDB.__useShim()
Due to a bug in WebKit, the window.indexedDB property is read-only and cannot be overridden by IndexedDBShim. Until the bug is fixed, the only workaround is to create an indexedDB variable in your closure. That way, all code within that closure will use the variable instead of the window.indexedDB property. For example:
(function() {
// This works on all devices/browsers, and only uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// This code will use the native IndexedDB if it exists, or the shim otherwise
indexedDB.open("MyDatabase", 1);
})();
Windows 8 and 8.1 support IndexedDB natively, so the plugin won't do anything by default.
Windows 8.x's implementation of IndexedDB is mising some features, such as compound keys and compound indexes. If you need those features in your app, then you may want to use this plugin rather than the native implementation. To do that, add the following line of cose to your app:
window.shimIndexedDB.__useShim()
Windows Phone does not support IndexedDB or WebSQL, so this plugin will automatically load the asynchronous WebSQL plugin to add WebSQL support, and then use IndexedDBShim to expose WebSQL to your app via the IndexedDB API. It's complicated, but it works. :)
The WebSQL plugin is specifically written for Windows Phone, so it only supports the two processor architectures that Windows Phone supports (x86 and arm). This means that you need to specify an extra flag when building your Windows Phone app via Cordova:
cordova build windows --archs="x86 arm" -- --phone
FAQs
An asynchronous IndexedDB plug-in for Cordova apps
The npm package cordova-plugin-indexeddb-async receives a total of 20 weekly downloads. As such, cordova-plugin-indexeddb-async popularity was classified as not popular.
We found that cordova-plugin-indexeddb-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.