Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function CordovaSQLitePouch (opts, callback) {
var websql = createOpenDBFunction(opts)
var _opts = assign({
websql: websql
}, opts)
if (typeof cordova === 'undefined' || (typeof sqlitePlugin === 'undefined' && typeof openDatabase === 'undefined')) {
console.error(
'PouchDB error: you must install a SQLite plugin ' +
'in order for PouchDB to work on this platform. Options:' +
'\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2' +
'\n - https://github.com/litehelpers/Cordova-sqlite-storage' +
'\n - https://github.com/Microsoft/cordova-plugin-websql')
}
if ('default' in WebSqlPouchCore && typeof WebSqlPouchCore.default.call === 'function') {
WebSqlPouchCore.default.call(this, _opts, callback)
} else {
WebSqlPouchCore.call(this, _opts, callback)
}
}
var websql = createOpenDBFunction(opts)
var _opts = assign({
websql: websql
}, opts)
if (typeof cordova === 'undefined' || (typeof sqlitePlugin === 'undefined' && typeof openDatabase === 'undefined')) {
console.error(
'PouchDB error: you must install a SQLite plugin ' +
'in order for PouchDB to work on this platform. Options:' +
'\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2' +
'\n - https://github.com/litehelpers/Cordova-sqlite-storage' +
'\n - https://github.com/Microsoft/cordova-plugin-websql')
}
if ('default' in WebSqlPouchCore && typeof WebSqlPouchCore.default.call === 'function') {
WebSqlPouchCore.default.call(this, _opts, callback)
} else {
WebSqlPouchCore.call(this, _opts, callback)
}
}