pouchdb-adapter-websql
Advanced tools
Comparing version 5.4.0 to 5.4.1
@@ -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 |
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
19902
190
+ Addedpouchdb-adapter-utils@5.4.1(transitive)
+ Addedpouchdb-adapter-websql-core@5.4.1(transitive)
+ Addedpouchdb-binary-utils@5.4.1(transitive)
+ Addedpouchdb-errors@5.4.1(transitive)
+ Addedpouchdb-json@5.4.1(transitive)
+ Addedpouchdb-md5@5.4.1(transitive)
+ Addedpouchdb-merge@5.4.1(transitive)
+ Addedpouchdb-promise@5.4.1(transitive)
+ Addedpouchdb-utils@5.4.1(transitive)
- Removedpouchdb-adapter-utils@5.4.0(transitive)
- Removedpouchdb-adapter-websql-core@5.4.0(transitive)
- Removedpouchdb-binary-utils@5.4.0(transitive)
- Removedpouchdb-errors@5.4.0(transitive)
- Removedpouchdb-json@5.4.0(transitive)
- Removedpouchdb-md5@5.4.0(transitive)
- Removedpouchdb-merge@5.4.0(transitive)
- Removedpouchdb-promise@5.4.0(transitive)
- Removedpouchdb-utils@5.4.0(transitive)
Updatedpouchdb-utils@5.4.1