function a(s,e){return"["+e.toString()+"m"+s+"[39m"}function aE(s,e,r){assert.equal(s[e],a(s,r));assert.equal(colors[e](s),a(s,r));assert.equal(s[e],colors[e](s));assert.equal(s[e].stripColors,s);assert.equal(s[e].stripColors,colors.stripColors(s))}function h(s,e){return'<span style="color:'+e+';">'+s+"</span>"}var assert=require("assert"),colors=require("./colors"),s="string",stylesColors=["white","black","blue","cyan","green","magenta","red","yellow"],stylesAll=stylesColors.concat(["bold","italic","underline","inverse","rainbow"]);colors.mode="console";assert.equal(s.bold,"[1m"+s+"[22m");assert.equal(s.italic,"[3m"+s+"[23m");assert.equal(s.underline,"[4m"+s+"[24m");assert.equal(s.strikethrough,"[9m"+s+"[29m");assert.equal(s.inverse,"[7m"+s+"[27m");assert.ok(s.rainbow);aE(s,"white",37);aE(s,"grey",90);aE(s,"black",30);aE(s,"blue",34);aE(s,"cyan",36);aE(s,"green",32);aE(s,"magenta",35);aE(s,"red",31);aE(s,"yellow",33);assert.equal(s,"string");colors.setTheme({error:"red"});assert.equal(typeof"astring".red,"string");assert.equal(typeof"astring".error,"string");colors.mode="browser";assert.equal(s.bold,"<b>"+s+"</b>");assert.equal(s.italic,"<i>"+s+"</i>");assert.equal(s.underline,"<u>"+s+"</u>");assert.equal(s.strikethrough,"<del>"+s+"</del>");assert.equal(s.inverse,'<span style="background-color:black;color:white;">'+s+"</span>");assert.ok(s.rainbow);stylesColors.forEach(function(e){assert.equal(s[e],h(s,e));assert.equal(colors[e](s),h(s,e))});assert.equal(typeof"astring".red,"string");assert.equal(typeof"astring".error,"string");colors.mode="none";stylesAll.forEach(function(e){assert.equal(s[e],s);assert.equal(colors[e](s),s)});assert.equal(typeof"astring".red,"string");assert.equal(typeof"astring".error,"string");