itty-chroma
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -1,1 +0,1 @@ | ||
"use strict";const t=new Proxy((()=>{}),{get:(t,e,o,r="",c)=>new Proxy(((...t)=>{let e,o=[r],s="%c",i=r.match(/pad|dec/);for(let r of t)r.zq&&(r=r()),r?.[0]?.startsWith?.("%c")?(e=r[1].match(/pad|dec/),i&&(s=s.slice(0,-1)),i&&!e&&(s+="%c ",o.push("")),s+=r[0],o.push(...r.slice(1)),i=e):(s+="object"==typeof r?"%o ":"%s ",o.push(r));return c?console[c](s.trim(),...o):[s,...o]}),{get:(t,e,o,s=t=>e=>(r+=(t?`${t}:${e}`:e)+";")&&o)=>"color"==e?s(e):"bold"==e?s("font-weight")(e):"italic"==e?s("font-style")(e):"underline"==e?s("text-decoration")(e):"strike"==e?s("text-decoration")("line-through"):"font"==e?s("font-family"):"size"==e?s("font-size"):"bg"==e?s("background"):"radius"==e?s("border-radius"):"padding"==e||"border"==e?s(e):"style"==e?s(""):"log"==e||"warn"==e||"error"==e?(c=e)&&o:s("color")(e)})[e]});exports.chroma=t; | ||
"use strict";const t=new Proxy((()=>{}),{get:(t,e,o,r="",c)=>new Proxy(((...t)=>{let e,o=[r],s="%c",i=r.match(/pad|dec/);for(let r of t)r?.zq&&(r=r()),r?.[0]?.startsWith?.("%c")?(e=r[1].match(/pad|dec/),i&&(s=s.slice(0,-1)),i&&!e&&(s+="%c ",o.push("")),s+=r[0],o.push(...r.slice(1)),i=e):(s+="object"==typeof r?"%o ":"%s ",o.push(r));return c?console[c](s.trim(),...o):[s,...o]}),{get:(t,e,o,s=t=>e=>(r+=(t?`${t}:${e}`:e)+";")&&o)=>"color"==e?s(e):"bold"==e?s("font-weight")(e):"italic"==e?s("font-style")(e):"underline"==e?s("text-decoration")(e):"strike"==e?s("text-decoration")("line-through"):"font"==e?s("font-family"):"size"==e?s("font-size"):"bg"==e?s("background"):"radius"==e?s("border-radius"):"padding"==e||"border"==e?s(e):"style"==e?s(""):"log"==e||"warn"==e||"error"==e?(c=e)&&o:s("color")(e)})[e]});exports.chroma=t; |
{ | ||
"name": "itty-chroma", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Powerful styling for the browser console in under 500 bytes.", | ||
@@ -5,0 +5,0 @@ "main": "./chroma.js", |
Sorry, the diff of this file is not supported yet
6683