This file contains hidden or 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
console.log("v11 starting..") | |
var incomplete = [...document.querySelectorAll('img')].filter((img) => !img.complete); | |
function sleep (time) { | |
return new Promise((resolve) => setTimeout(resolve, time)); | |
} | |
const statusId = "df4bc682879a9ba2a29f"; | |
var div = document.createElement("div"); | |
div.id = statusId; | |
div.style = "position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 100px; background-color: lightblue; text-align: center; line-height: 100px;"; | |
var h = document.createElement("H1"); |
This file contains hidden or 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
extension Dictionary { | |
/// Transforms dictionary keys without modifying values. | |
/// Deduplicates transformed keys. | |
/// | |
/// Example: | |
/// ``` | |
/// ["one": 1, "two": 2, "three": 3, "": 4].mapKeys({ $0.first }, uniquingKeysWith: { max($0, $1) }) | |
/// // [Optional("o"): 1, Optional("t"): 3, nil: 4] | |
/// ``` |