(src, target, opts, callback)
| 10321 | } |
| 10322 | |
| 10323 | function replicateWrapper(src, target, opts, callback) { |
| 10324 | |
| 10325 | if (typeof opts === 'function') { |
| 10326 | callback = opts; |
| 10327 | opts = {}; |
| 10328 | } |
| 10329 | if (typeof opts === 'undefined') { |
| 10330 | opts = {}; |
| 10331 | } |
| 10332 | |
| 10333 | if (opts.doc_ids && !Array.isArray(opts.doc_ids)) { |
| 10334 | throw createError(BAD_REQUEST, |
| 10335 | "`doc_ids` filter parameter is not a list."); |
| 10336 | } |
| 10337 | |
| 10338 | opts.complete = callback; |
| 10339 | opts = clone(opts); |
| 10340 | opts.continuous = opts.continuous || opts.live; |
| 10341 | opts.retry = ('retry' in opts) ? opts.retry : false; |
| 10342 | opts.PouchConstructor = opts.PouchConstructor || this; |
| 10343 | var replicateRet = new Replication(opts); |
| 10344 | var srcPouch = toPouch(src, opts); |
| 10345 | var targetPouch = toPouch(target, opts); |
| 10346 | replicate(srcPouch, targetPouch, opts, replicateRet); |
| 10347 | return replicateRet; |
| 10348 | } |
| 10349 | |
| 10350 | function sync(src, target, opts, callback) { |
| 10351 | if (typeof opts === 'function') { |
no test coverage detected
searching dependent graphs…