Skip to content

Instantly share code, notes, and snippets.

View Humberd's full-sized avatar

Maciej Sawicki Humberd

  • Warsaw, Poland
View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<title>Document</title>
var _0xeae2 = ["\x79\x31\x79", "\x79\x79\x32", "\x79\x79\x33", "\x79\x79\x34", "\x79\x79\x35", "\x79\x79\x36", "\x79\x79\x37", "\x79\x79\x38", "\x79\x79\x39", "\x79\x32\x30", "\x79\x32\x79", "\x79\x32\x32", "\x79\x32\x33", "\x79\x32\x34", "\x79\x32\x35", "\x79\x32\x36", "\x79\x32\x37", "\x79\x32\x38", "\x79\x32\x39", "\x79\x33\x30", "\x21\x33\x21", "\x21\x33\x32", "\x21\x33\x33", "\x21\x33\x34", "\x21\x33\x35", "\x21\x33\x36", "\x21\x33\x37", "\x21\x33\x38", "\x21\x33\x39", "\x21\x34\x30", "\x21\x34\x21", "\x21\x34\x32", "\x21\x34\x33", "\x21\x34\x34", "\x21\x34\x35", "\x21\x34\x36", "\x21\x34\x37", "\x21\x34\x38", "\x21\x34\x39", "\x21\x35\x30", "\x21\x35\x21", "\x21\x35\x32", "\x21\x35\x33", "\x31\x62\x34", "\x31\x62\x62", "\x31\x62\x61", "\x31\x62\x37", "\x31\x62\x38", "\x31\x62\x39", "\x31\x61\x30", "\x31\x61\x31", "\x31\x61\x32", "\x31\x61\x33", "\x31\x61\x34", "\x31\x61\x62", "\x31\x61\x61", "\x31\x61\x37", "\x31\x61\x38", "\x31\x61\x39", "\x31\x37\x30", "\x31\x37\x31", "\x31\x37\x32", "\x31\x37\x33", "
@Humberd
Humberd / async-validator-wrapper.ts
Last active October 31, 2019 19:00
Async Validator Wrapper for Angular 2 Reactive Forms.This wrapper lets you debounce your asyncValidator instead of on every keystroke
import { AbstractControl } from "@angular/forms";
import { Observable } from "rxjs/Observable";
import { Subject } from "rxjs/Subject";
export class QstAsyncValidatorWrapper {
/*
* Angular async validators are triggered on every key stroke.
* This function debounces triggering an async validator.
*