Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion lib/pouch-utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
'use strict';

var Promise = require('pouchdb-promise');
/* istanbul ignore next */
function _interopDefault (ex) {
if(ex && (typeof ex === 'object') && 'default' in ex) {
return ex['default'];
}
return ex;
}

/* istanbul ignore next */
function _getPromise() {
if(typeof Promise === 'function') {
return Promise;
}
return _interopDefault(require('pouchdb-promise'));
}

var Promise = _getPromise();

/* istanbul ignore next */
exports.once = function (fun) {
var called = false;
Expand Down