This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Safari and Edge polyfill for createImageBitmap | |
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap | |
* | |
* Support source image types Blob and ImageData. | |
* | |
* From: https://dev.to/nektro/createimagebitmap-polyfill-for-safari-and-edge-228 | |
* Updated by Yoan Tournade <[email protected]> | |
* Updated by Andrew Tatomyr | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[0, 1], [2, 3], [4, 5]].reduce((prev, item) => item.map((_, i) => [...(prev[i] || []), item[i]]), []); // [[0, 2, 4], [1, 3, 5]] |