Skip to content

Instantly share code, notes, and snippets.

View frankie9793's full-sized avatar

Frankie Ye frankie9793

  • Bay Area
View GitHub Profile

Javascript Regular Expressions

A regular expression or regex describes a pattern of characters. It can be used to perform powerful pattern-matching and search-and-replace functions on text.

Defining Regular Expressions

Regular expression literals let pattern = /s$/;

Regular Expression Object

@frankie9793
frankie9793 / javascript_debouncer.md
Last active July 14, 2019 08:25
JavaScript Debouncer

Javascript Debouncer

Context

When typing into a search input, there is a delay before the typeahead results appear. This functionality is controlled by a function called debounce().

Funtionality

The debounce() function delays processing of keyup event (events in general) until the user stopped typing for a specified amount of time.

@frankie9793
frankie9793 / CSS_Position_to_align_elements.md
Last active July 14, 2019 02:24
CSS Position Property to Align Elements

Using CSS Position property to Align Elements

Five main values of CSS Positions: position: static | relative | absolute | fixed | sticky

and helper properties for setting the coordinates of an element top | right | bottom | left | z-index These properties don't work without a declared position, or with static

z-index : As value increases, it moves in front of other elements,