()
| 5607 | } |
| 5608 | exports.default = parseToImageBitmap; |
| 5609 | function _parseToImageBitmap() { |
| 5610 | _parseToImageBitmap = (0, _asyncToGeneratorDefault.default)((0, _regeneratorDefault.default).mark(function _callee(arrayBuffer, options, url) { |
| 5611 | var blob, image, imagebitmapOptions; |
| 5612 | return (0, _regeneratorDefault.default).wrap(function _callee$(_context) { |
| 5613 | while(true)switch(_context.prev = _context.next){ |
| 5614 | case 0: |
| 5615 | if (!(0, _svgUtils.isSVG)(url)) { |
| 5616 | _context.next = 7; |
| 5617 | break; |
| 5618 | } |
| 5619 | _context.next = 3; |
| 5620 | return (0, _parseToImageDefault.default)(arrayBuffer, options, url); |
| 5621 | case 3: |
| 5622 | image = _context.sent; |
| 5623 | blob = image; |
| 5624 | _context.next = 8; |
| 5625 | break; |
| 5626 | case 7: |
| 5627 | blob = (0, _svgUtils.getBlob)(arrayBuffer, url); |
| 5628 | case 8: |
| 5629 | imagebitmapOptions = options && options.imagebitmap; |
| 5630 | _context.next = 11; |
| 5631 | return safeCreateImageBitmap(blob, imagebitmapOptions); |
| 5632 | case 11: |
| 5633 | return _context.abrupt("return", _context.sent); |
| 5634 | case 12: |
| 5635 | case "end": |
| 5636 | return _context.stop(); |
| 5637 | } |
| 5638 | }, _callee); |
| 5639 | })); |
| 5640 | return _parseToImageBitmap.apply(this, arguments); |
| 5641 | } |
| 5642 | function safeCreateImageBitmap(_x4) { |
| 5643 | return _safeCreateImageBitmap.apply(this, arguments); |
| 5644 | } |
nothing calls this directly
no test coverage detected