Skip to content

Instantly share code, notes, and snippets.

if (typeof cheat === 'undefined') cheat = {
intervals: {},
start(f, s){
if (!f.name) throw 'function must have a name';
try {this.stop(f.name)} catch {};
this.intervals[f.name] = setInterval(f, s);
},
stop(name){
if (this.intervals[name] === undefined) throw `${name} does not exist`;
clearInterval(this.intervals[name]);
@Patrolin
Patrolin / qPact.js
Last active September 3, 2021 23:09
qPact.js
const QPACT_VERSION = '4.6';
function qDescribe(input) {
return `${
input != null ? `<${input.constructor.name}>` : ''
}${input}`;
}
// Q
function q(input) {