Skip to content

Instantly share code, notes, and snippets.

View spikeninja's full-sized avatar
🎯
Focusing

Artur spikeninja

🎯
Focusing
View GitHub Profile
@spikeninja
spikeninja / api-client.ts
Created April 4, 2025 18:49
axios-like wrapper over fetch
export class ApiClient {
private baseUrl: string
private config: RequestInit
private afterRequest: ((response: Response) => Response)[]
private beforeRequest: ((config: RequestInit) => RequestInit)[]
constructor({
baseUrl,
signal,
credentials,
def clean_text(text):
cleaned_str = re.sub('[^а-яїіґє\\s]+', '',text,flags=re.IGNORECASE)
cleaned_str = re.sub('(\\s+)', ' ',cleaned_str)
cleaned_str = cleaned_str.lower()
return cleaned_str