JSFiddle - React, Tailwind, and code Playground
by path411
HTML
<canvas id="Screen"></canvas>
<canvas id="MiniMap"></canvas>
JavaScript
/*
* Switcher JS Library
* Ben Russell
* https://github.com/Ben-Russell/Switcher
* Version 1.2
*/
(function(){function c(b,a){this.Expression=b;this.EvaluateFunctions=a;this.Result=void 0;this.Passed=!1}function d(b,a){b.Passed=!0;b.Result="function"===typeof a&&b.EvaluateFunctions?a():a}c.prototype.Case=function(b,a){var c=this;switch(Object.prototype.toString.call(b)){case "[object Array]":for(var e=0,f=b.length;e<f;e++)c=this.Case(b[e],a);break;case "[object RegExp]":b.test(this.Expression)&&d(this,a);break;case "[object Boolean]":if("[object Boolean]"!=Object.prototype.toString.call(this.Expression)){b&&
d(this,a);break}default:this.Expression==b&&d(this,a)}return c};c.prototype.Default=function(b){var a=this;this.Passed||(a=this.Case(this.Expression,b));return a};window.Switcher=function(b,a){"undefined"===typeof a&&(a=!0);return new c(b,a)}})();
var map =...