Skip to content

Instantly share code, notes, and snippets.

View rafalwojcik's full-sized avatar
🏠
Working from home

Rafał Wójcik rafalwojcik

🏠
Working from home
View GitHub Profile
@rafalwojcik
rafalwojcik / RetryWhen.swift
Created June 28, 2021 13:15 — forked from danielt1263/RetryWhen.swift
I have implemented RetryWhen in Combine.
//
// RetryWhen.swift
// CombineSandbox
//
// Created by Daniel Tartaglia on 9/27/19.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import Combine
function sleep(ms = 5000) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function stripHTML(html) {
return html.replace(/(<([^>]+)>)/gi, "");
}
function clickOnAction(actionSelector) {
var buttons = document.querySelectorAll(actionSelector);