(iterable, iterator)
| 40 | // Lifted from https://github.com/sindresorhus/p-map-series |
| 41 | // Thanks @sindresorhus! 🙏 |
| 42 | const pMapSeries = (iterable, iterator) => { |
| 43 | const ret = [] |
| 44 | |
| 45 | return pReduce(iterable, (a, b, i) => |
| 46 | Promise.resolve(iterator(b, i)).then(val => { |
| 47 | ret.push(val) |
| 48 | }), |
| 49 | ).then(() => ret) |
| 50 | } |
| 51 | |
| 52 | const ensureChild = child => |
| 53 | child && typeof child.render === 'function' |
no test coverage detected