Comparing version 3.8.0 to 3.8.1
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});let{round:e,floor:t,max:r}=Math,n=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],r=t?t.length:0;if(3===r)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(6!==r)return[0,0,0];let n=parseInt(t,16);return[n>>16&255,n>>8&255,255&n]},i=(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:e((t-8)/247*24)+232:16+36*e(t/51)+6*e(r/51)+e(n/51),l=n=>{let i,l,o,s,a;return n<8?30+n:n<16?n-8+90:(n>=232?i=l=o=(10*(n-232)+8)/255:(a=(n-=16)%36,i=t(n/36)/5,l=t(a/6)/5,o=a%6/5),s=2*r(i,l,o),s?30+(e(o)<<2|e(l)<<1|e(i))+(2===s?60:0):30)},o=(()=>{let e=e=>l.some((t=>e.test(t))),t=globalThis,r=t.Deno,n=!!r,i=t.process||r||{},l=i.argv||i.args||[],o=i.env||{},s=-1;if(n)try{o=o.toObject()}catch(e){s=0}let a=!!o.PM2_HOME&&!!o.pm_id||o.NEXT_RUNTIME?.includes("edge")||(n?r.isatty(1):!!i.stdout?.isTTY),c="FORCE_COLOR",u=o[c],p=parseInt(u),g=isNaN(p)?"false"===u?0:-1:p,d=c in o&&g||e(/^-{1,2}color=?(true|always)?$/);return d&&(s=g),s<0&&(s=((e,t,r)=>{let{TERM:n,COLORTERM:i}=e;return"truecolor"===i||"24bit"===i?3:"ansi256"===i?2:"ansi"===i||e.TF_BUILD?1:e.TEAMCITY_VERSION?2:e.CI?["GITHUB_ACTIONS","GITEA_ACTIONS"].some((t=>t in e))?3:1:!t||/-mono|dumb/i.test(n)?0:r||/^xterm-(kitty|direct)$/i.test(n)?3:/-256(colou?r)?$/i.test(n)?2:/^screen|^tmux|^xterm|^vt[1-5][0-9]([0-9])?|^ansi|color|cygwin|linux|mintty|rxvt/i.test(n)?1:3})(o,a,"win32"===(n?r.build.os:i.platform))),!g||o.NO_COLOR||e(/^-{1,2}(no-color|color=(false|never))$/)?0:d&&0===s?3:s})(),s=o>0,a={open:"",close:""},c=s?(e,t)=>({open:`[${e}m`,close:`[${t}m`}):()=>a,u=39,p=49,g=(e,t)=>(r,n,o)=>c(((e,t,r)=>l(i(e,t,r)))(r,n,o)+e,t),d=e=>(t,r,n)=>e(i(t,r,n)),f=e=>t=>{let[r,i,l]=n(t);return e(r,i,l)},b=e=>c(`38;5;${e}`,u),_=e=>c(`48;5;${e}`,p),O=(e,t,r)=>c(`38;2;${e};${t};${r}`,u),m=(e,t,r)=>c(`48;2;${e};${t};${r}`,p);1===o?(b=e=>c(l(e),u),_=e=>c(l(e)+10,p),O=g(0,u),m=g(10,p)):2===o&&(O=d(b),m=d(_));let y,x,$={ansi256:b,bgAnsi256:_,fg:b,bg:_,rgb:O,bgRgb:m,hex:f(O),bgHex:f(m),visible:a,reset:c(0,0),bold:c(1,22),dim:c(2,22),italic:c(3,23),underline:c(4,24),inverse:c(7,27),hidden:c(8,28)},h="black,red,green,yellow,blue,magenta,cyan,white".split(","),T="Bright",I=30;for(y of h)x="bg"+y[0].toUpperCase()+y.slice(1),$[y]=c(I,u),$[y+T]=c(I+60,u),$[x]=c(I+10,p),$[x+T]=c(I+70,p),I++;$.grey=$.gray=c(90,u),$.bgGrey=$.bgGray=c(100,p),$.strikethrough=$.strike=c(9,29);let R,{create:v,defineProperty:C,setPrototypeOf:E}=Object,w={},M=({_p:e},{open:t,close:r})=>{let n=(e,...t)=>{if(""===e)return e;let r=n._p,{_a:i,_b:l}=r,o=e?.raw?String.raw(e,...t):""+e;if(o.includes(""))for(;r;){let e,t,n=r.close,i=r.open,l=n.length,s="";if(l){for(e=0;~(t=o.indexOf(n,e));e=t+l)s+=o.slice(e,t)+i;e&&(o=s+o.slice(e))}r=r._p}return~o.indexOf("\n")&&(o=o.replace(/(\r?\n)/g,l+"$1"+i)),i+o+l},i=t,l=r;return e&&(i=e._a+t,l=r+e._b),E(n,R),n._p={open:t,close:r,_a:i,_b:l,_p:e},n.open=i,n.close=l,n};const N=function(){let e={isSupported:()=>s,strip:e=>e.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),extend(t){for(let e in t){let r=t[e],i=(typeof r)[0],l="s"===i?O(...n(r)):r;w[e]="f"===i?{get(){return(...e)=>M(this,r(...e))}}:{get(){let t=M(this,l);return C(this,e,{value:t}),t}}}return R=v({},w),E(e,R),e}};return e.extend($)},A=new N;module.exports=A,module.exports.Ansis=N,A.default=A; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});let{round:e,floor:t,max:r}=Math,n=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],r=t?t.length:0;if(3===r)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(6!==r)return[0,0,0];let n=parseInt(t,16);return[n>>16&255,n>>8&255,255&n]},i=(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:e((t-8)/247*24)+232:16+36*e(t/51)+6*e(r/51)+e(n/51),l=n=>{let i,l,o,s,a;return n<8?30+n:n<16?n-8+90:(n>=232?i=l=o=(10*(n-232)+8)/255:(a=(n-=16)%36,i=t(n/36)/5,l=t(a/6)/5,o=a%6/5),s=2*r(i,l,o),s?30+(e(o)<<2|e(l)<<1|e(i))+(2===s?60:0):30)},o=(()=>{let e=e=>l.some((t=>e.test(t))),t=globalThis,r=t.Deno,n=!!r,i=t.process||r||{},l=i.argv||i.args||[],o=i.env||{},s=-1;if(n)try{o=o.toObject()}catch(e){s=0}let a=!!o.PM2_HOME&&!!o.pm_id||o.NEXT_RUNTIME?.includes("edge")||(n?r.isatty(1):!!i.stdout?.isTTY),c="FORCE_COLOR",u=o[c],p=parseInt(u),f=isNaN(p)?"false"===u?0:-1:p,g=c in o&&f||e(/^-{1,2}color=?(true|always)?$/);return g&&(s=f),s<0&&(s=((e,t,r)=>{let{TERM:n,COLORTERM:i}=e;return"truecolor"===i||"24bit"===i?3:"ansi256"===i?2:"ansi"===i||e.TF_BUILD?1:e.TEAMCITY_VERSION?2:e.CI?["GITHUB_ACTIONS","GITEA_ACTIONS"].some((t=>t in e))?3:1:!t||/-mono|dumb/i.test(n)?0:r||/^xterm-(kitty|direct)$/i.test(n)?3:/-256(colou?r)?$/i.test(n)?2:/^screen|^tmux|^xterm|^vt[1-5][0-9]([0-9])?|^ansi|color|cygwin|linux|mintty|rxvt/i.test(n)?1:3})(o,a,"win32"===(n?r.build.os:i.platform))),!f||o.NO_COLOR||e(/^-{1,2}(no-color|color=(false|never))$/)?0:g&&0===s?3:s})(),s=o>0,a={open:"",close:""},c=s?(e,t)=>({open:`[${e}m`,close:`[${t}m`}):()=>a,u=39,p=49,f=(e,t)=>(r,n,o)=>c(((e,t,r)=>l(i(e,t,r)))(r,n,o)+e,t),g=e=>(t,r,n)=>e(i(t,r,n)),d=e=>t=>{let[r,i,l]=n(t);return e(r,i,l)},b=e=>c(`38;5;${e}`,u),_=e=>c(`48;5;${e}`,p),O=(e,t,r)=>c(`38;2;${e};${t};${r}`,u),m=(e,t,r)=>c(`48;2;${e};${t};${r}`,p);1===o?(b=e=>c(l(e),u),_=e=>c(l(e)+10,p),O=f(0,u),m=f(10,p)):2===o&&(O=g(b),m=g(_));let x,y,$={ansi256:b,bgAnsi256:_,fg:b,bg:_,rgb:O,bgRgb:m,hex:d(O),bgHex:d(m),visible:a,reset:c(0,0),bold:c(1,22),dim:c(2,22),italic:c(3,23),underline:c(4,24),inverse:c(7,27),hidden:c(8,28)},h="black,red,green,yellow,blue,magenta,cyan,white".split(","),T="Bright",I=30;for(x of h)y="bg"+x[0].toUpperCase()+x.slice(1),$[x]=c(I,u),$[x+T]=c(I+60,u),$[y]=c(I+10,p),$[y+T]=c(I+70,p),I++;$.grey=$.gray=c(90,u),$.bgGrey=$.bgGray=c(100,p),$.strikethrough=$.strike=c(9,29);let R,{create:v,defineProperty:C,setPrototypeOf:E}=Object,w={},M=({_p:e},{open:t,close:r})=>{let n=(e,...t)=>{if(""===e)return e;let r=n._p,{_a:i,_b:l}=r,o=e?.raw?String.raw(e,...t):""+e;if(~o.indexOf(""))for(;r;){let e,t=r.close,n=r.open,i=t.length,l="",s=0;if(i){for(;~(e=o.indexOf(t,s));s=e+i)l+=o.slice(s,e)+n;o=l+o.slice(s)}r=r._p}return~o.indexOf("\n")&&(o=o.replace(/(\r?\n)/g,l+"$1"+i)),i+o+l},i=t,l=r;return e&&(i=e._a+t,l=r+e._b),E(n,R),n._p={open:t,close:r,_a:i,_b:l,_p:e},n.open=i,n.close=l,n};const N=function(){let e={isSupported:()=>s,strip:e=>e.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),extend(t){for(let e in t){let r=t[e],i=(typeof r)[0],l="s"===i?O(...n(r)):r;w[e]="f"===i?{get(){return(...e)=>M(this,r(...e))}}:{get(){let t=M(this,l);return C(this,e,{value:t}),t}}}return R=v({},w),E(e,R),e}};return e.extend($)},A=new N;module.exports=A,module.exports.Ansis=N,A.default=A; |
{ | ||
"name": "ansis", | ||
"version": "3.8.0", | ||
"description": "ANSI colors and styles in terminal output", | ||
"keywords": [ | ||
"ansi", | ||
"color", | ||
"console", | ||
"terminal", | ||
"cli" | ||
], | ||
"license": "ISC", | ||
"author": "webdiscus", | ||
"repository": "webdiscus/ansis", | ||
"main": "./index.js", | ||
"types": "./index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"require": "./index.js", | ||
"import": "./index.mjs" | ||
} | ||
}, | ||
"sideEffects": false, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"files": [ | ||
"index.*" | ||
] | ||
"name":"ansis", | ||
"version":"3.8.1", | ||
"description":"ANSI colors in terminal output", | ||
"keywords":["ansi","color","style","terminal","cli"], | ||
"license":"ISC", | ||
"author":"webdiscus", | ||
"repository":"webdiscus/ansis", | ||
"main":"./index.js", | ||
"types":"./index.d.ts", | ||
"exports":{ | ||
".":{ | ||
"types":"./index.d.ts", | ||
"require":"./index.js", | ||
"import":"./index.mjs" | ||
} | ||
}, | ||
"sideEffects":false, | ||
"engines":{"node":">=16"}, | ||
"files":["index.*"] | ||
} |
@@ -1,7 +0,7 @@ | ||
<h1 align="center"><img src="docs/img/logo.png"></h1> | ||
# Ansis | ||
Colorize terminal with ANSI colors & styles. | ||
Enable ANSI colors in terminal output. | ||
## 📖 [Docs on GitHub](https://github.com/webdiscus/ansis) | ||
![](docs/img/npm.png) | ||
![](docs/npm.png) |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6769