UNPKG

imba

Version:

Intuitive and powerful language for building webapps that fly

2 lines (1 loc) 1.24 kB
var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strike:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightΞred:[91,39],brightΞgreen:[92,39],brightΞyellow:[93,39],brightΞblue:[94,39],brightΞmagenta:[95,39],brightΞcyan:[96,39],brightΞwhite:[97,39],bgΞblack:[40,49],bgΞred:[41,49],bgΞgreen:[42,49],bgΞyellow:[43,49],bgΞblue:[44,49],bgΞmagenta:[45,49],bgΞcyan:[46,49],bgΞwhite:[47,49],bgΞgray:[100,49],bgΞgrey:[100,49],bgΞbrightΞred:[101,49],bgΞbrightΞgreen:[102,49],bgΞbrightΞyellow:[103,49],bgΞbrightΞblue:[104,49],bgΞbrightΞmagenta:[105,49],bgΞbrightΞcyan:[106,49],bgΞbrightΞwhite:[107,49]},l={};for(let e=0,b=Object.keys(r),g=b.length,t;e<g;e++){t=b[e];let[n,i]=r[t];l[t]=function(o){return"\x1B["+n+"m"+o+"\x1B["+i+"m"}}var h=l;for(let e=0,b=Object.keys(r),g=b.length,t;e<g;e++){t=b[e];let[n,i]=r[t];String.prototype.__defineGetter__(t,function(){return"\x1B["+n+"m"+this+"\x1B["+i+"m"})}String.prototype.f=function(e){return"\x1B[38;5;"+e+"m"+this+"\x1B[39m"};String.prototype.b=function(e){return"\x1B[48;5;"+e+"m"+this+"\x1B[49m"};export{h as default};