Skip to content

Instantly share code, notes, and snippets.

View gukandrew's full-sized avatar
🇺🇦

gukandrew

🇺🇦
View GitHub Profile
/*
Create a Mask for an email address using ES6 syntax
Could be used for confirmation of email address or preventing to public expose of address
Author: Andrew Guk https://gist.github.com/gukandrew
*/
function emailMask(email, mask = '*') {
let masked = '';
let prev;
@gukandrew
gukandrew / easing.js
Created May 22, 2018 11:44 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity