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

pouchdb-adapter-websql

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-adapter-websql - npm Package Compare versions

Comparing version 5.4.0 to 5.4.1

30

lib/index.js

@@ -71,16 +71,26 @@ 'use strict';

function websql(optsOrName, version, description, size) {
if (typeof sqlitePlugin !== 'undefined') {
// The SQLite Plugin started deviating pretty heavily from the
// standard openDatabase() function, as they started adding more features.
// It's better to just use their "new" format and pass in a big ol'
// options object.
return sqlitePlugin.openDatabase(optsOrName);
}
function createOpenDBFunction(opts) {
return function (name, version, description, size) {
if (typeof sqlitePlugin !== 'undefined') {
// The SQLite Plugin started deviating pretty heavily from the
// standard openDatabase() function, as they started adding more features.
// It's better to just use their "new" format and pass in a big ol'
// options object. Also there are many options here that may come from
// the PouchDB constructor, so we have to grab those.
var sqlitePluginOpts = jsExtend.extend({}, opts, {
name: name,
version: version,
description: description,
size: size
});
return sqlitePlugin.openDatabase(sqlitePluginOpts);
}
// Traditional WebSQL API
return openDatabase(optsOrName, version, description, size);
// Traditional WebSQL API
return openDatabase(name, version, description, size);
};
}
function WebSQLPouch(opts, callback) {
var websql = createOpenDBFunction(opts);
var _opts = jsExtend.extend({

@@ -87,0 +97,0 @@ websql: websql

{
"name": "pouchdb-adapter-websql",
"version": "5.4.0",
"version": "5.4.1",
"description": "PouchDB adapter using WebSQL as its data store.",

@@ -17,5 +17,5 @@ "main": "./lib/index.js",

"js-extend": "1.0.1",
"pouchdb-adapter-websql-core": "5.4.0",
"pouchdb-utils": "5.4.0"
"pouchdb-adapter-websql-core": "5.4.1",
"pouchdb-utils": "5.4.1"
}
}

@@ -5,16 +5,26 @@ import WebSqlPouchCore from 'pouchdb-adapter-websql-core';

function websql(optsOrName, version, description, size) {
if (typeof sqlitePlugin !== 'undefined') {
// The SQLite Plugin started deviating pretty heavily from the
// standard openDatabase() function, as they started adding more features.
// It's better to just use their "new" format and pass in a big ol'
// options object.
return sqlitePlugin.openDatabase(optsOrName);
}
function createOpenDBFunction(opts) {
return function (name, version, description, size) {
if (typeof sqlitePlugin !== 'undefined') {
// The SQLite Plugin started deviating pretty heavily from the
// standard openDatabase() function, as they started adding more features.
// It's better to just use their "new" format and pass in a big ol'
// options object. Also there are many options here that may come from
// the PouchDB constructor, so we have to grab those.
var sqlitePluginOpts = extend({}, opts, {
name: name,
version: version,
description: description,
size: size
});
return sqlitePlugin.openDatabase(sqlitePluginOpts);
}
// Traditional WebSQL API
return openDatabase(optsOrName, version, description, size);
// Traditional WebSQL API
return openDatabase(name, version, description, size);
};
}
function WebSQLPouch(opts, callback) {
var websql = createOpenDBFunction(opts);
var _opts = extend({

@@ -21,0 +31,0 @@ websql: websql

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