(results, stores, opts)
| 5002 | } |
| 5003 | |
| 5004 | function fetchAttachments(results, stores, opts) { |
| 5005 | var atts = []; |
| 5006 | results.forEach(function (row) { |
| 5007 | if (!(row.doc && row.doc._attachments)) { |
| 5008 | return; |
| 5009 | } |
| 5010 | var attNames = Object.keys(row.doc._attachments); |
| 5011 | attNames.forEach(function (attName) { |
| 5012 | var att = row.doc._attachments[attName]; |
| 5013 | if (!('data' in att)) { |
| 5014 | atts.push(att); |
| 5015 | } |
| 5016 | }); |
| 5017 | }); |
| 5018 | |
| 5019 | return Promise.all(atts.map(function (att) { |
| 5020 | return fetchAttachment(att, stores, opts); |
| 5021 | })); |
| 5022 | } |
| 5023 | |
| 5024 | function LevelPouch(opts, callback) { |
| 5025 | opts = clone(opts); |
no test coverage detected
searching dependent graphs…