Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
a = function() { | |
var oldLog = console.log; | |
var modes = ["duel","ffa","2v2"]; | |
var reg = new RegExp(" to (\\\d*\\\.\\\d*)","i"); | |
var lasts = JSON.parse(localStorage.getItem('stars')) | |
var lastValues = [lasts[modes[0]],lasts[modes[1]],lasts[modes[2]]]; | |
console.log = function (message) { | |
var mode = -1 | |
modes.forEach(function (e,i) { |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
// Example implementation: http://jsfiddle.net/2f7w2fpn/ | |
var indent = 1; | |
function walk(tree) { | |
tree.forEach(function(node) { | |
console.log('--' + Array(indent).join('--'), node.key); | |
if(node.children) { | |
indent ++; | |
walk(node.children); | |
} |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |