(src, target, opts, callback)
| 10350 | } |
| 10351 | |
| 10352 | function replicateWrapper(src, target, opts, callback) { |
| 10353 | |
| 10354 | if (typeof opts === 'function') { |
| 10355 | callback = opts; |
| 10356 | opts = {}; |
| 10357 | } |
| 10358 | if (typeof opts === 'undefined') { |
| 10359 | opts = {}; |
| 10360 | } |
| 10361 | |
| 10362 | if (opts.doc_ids && !Array.isArray(opts.doc_ids)) { |
| 10363 | throw createError(BAD_REQUEST, |
| 10364 | "`doc_ids` filter parameter is not a list."); |
| 10365 | } |
| 10366 | |
| 10367 | opts.complete = callback; |
| 10368 | opts = clone(opts); |
| 10369 | opts.continuous = opts.continuous || opts.live; |
| 10370 | opts.retry = ('retry' in opts) ? opts.retry : false; |
| 10371 | opts.PouchConstructor = opts.PouchConstructor || this; |
| 10372 | var replicateRet = new Replication(opts); |
| 10373 | var srcPouch = toPouch(src, opts); |
| 10374 | var targetPouch = toPouch(target, opts); |
| 10375 | replicate(srcPouch, targetPouch, opts, replicateRet); |
| 10376 | return replicateRet; |
| 10377 | } |
| 10378 | |
| 10379 | function sync(src, target, opts, callback) { |
| 10380 | if (typeof opts === 'function') { |
no test coverage detected
searching dependent graphs…