Last active
May 12, 2017 20:54
-
-
Save lloss/a779601827a392c647392ee689547436 to your computer and use it in GitHub Desktop.
kekekek
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let f = []; | |
function addKek(func) { | |
if(typeof func === 'function'){for (let i = 0; i < f.length; i++) {if (f[i].includes(func)) {f[i][1] = true;return;}} | |
f = [...f, [func, false]]; | |
}else{throw new Error('input should be a function')} | |
} | |
function launcKek() { | |
for (let i = 0; i < f.length; i++) {if(typeof f[1] !== 'undefined' ){!f[i][1] ? (()=> {f[i][0](); f[i][1] = true})() : delete f[i];}} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment