@gjsify/util 0.3.19 → 0.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};export{t as __exportAll};
1
+ var e=Object.defineProperty,__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};export{__exportAll};
package/lib/esm/errors.js CHANGED
@@ -1 +1 @@
1
- const e={[-1]:`EPERM`,[-2]:`ENOENT`,[-3]:`ESRCH`,[-4]:`EINTR`,[-5]:`EIO`,[-6]:`ENXIO`,[-7]:`E2BIG`,[-8]:`ENOEXEC`,[-9]:`EBADF`,[-10]:`ECHILD`,[-11]:`EAGAIN`,[-12]:`ENOMEM`,[-13]:`EACCES`,[-14]:`EFAULT`,[-15]:`ENOTBLK`,[-16]:`EBUSY`,[-17]:`EEXIST`,[-18]:`EXDEV`,[-19]:`ENODEV`,[-20]:`ENOTDIR`,[-21]:`EISDIR`,[-22]:`EINVAL`,[-23]:`ENFILE`,[-24]:`EMFILE`,[-25]:`ENOTTY`,[-26]:`ETXTBSY`,[-27]:`EFBIG`,[-28]:`ENOSPC`,[-29]:`ESPIPE`,[-30]:`EROFS`,[-31]:`EMLINK`,[-32]:`EPIPE`,[-33]:`EDOM`,[-34]:`ERANGE`,[-35]:`EDEADLK`,[-36]:`ENAMETOOLONG`,[-37]:`ENOLCK`,[-38]:`ENOSYS`,[-39]:`ENOTEMPTY`,[-40]:`ELOOP`,[-42]:`ENOMSG`,[-43]:`EIDRM`,[-44]:`ECHRNG`,[-45]:`EL2NSYNC`,[-46]:`EL3HLT`,[-47]:`EL3RST`,[-48]:`ELNRNG`,[-49]:`EUNATCH`,[-50]:`ENOCSI`,[-51]:`EL2HLT`,[-52]:`EBADE`,[-53]:`EBADR`,[-54]:`EXFULL`,[-55]:`ENOANO`,[-56]:`EBADRQC`,[-57]:`EBADSLT`,[-59]:`EBFONT`,[-60]:`ENOSTR`,[-61]:`ENODATA`,[-62]:`ETIME`,[-63]:`ENOSR`,[-64]:`ENONET`,[-65]:`ENOPKG`,[-66]:`EREMOTE`,[-67]:`ENOLINK`,[-68]:`EADV`,[-69]:`ESRMNT`,[-70]:`ECOMM`,[-71]:`EPROTO`,[-72]:`EMULTIHOP`,[-73]:`EDOTDOT`,[-74]:`EBADMSG`,[-75]:`EOVERFLOW`,[-76]:`ENOTUNIQ`,[-77]:`EBADFD`,[-78]:`EREMCHG`,[-79]:`ELIBACC`,[-80]:`ELIBBAD`,[-81]:`ELIBSCN`,[-82]:`ELIBMAX`,[-83]:`ELIBEXEC`,[-84]:`EILSEQ`,[-85]:`ERESTART`,[-86]:`ESTRPIPE`,[-87]:`EUSERS`,[-88]:`ENOTSOCK`,[-89]:`EDESTADDRREQ`,[-90]:`EMSGSIZE`,[-91]:`EPROTOTYPE`,[-92]:`ENOPROTOOPT`,[-93]:`EPROTONOSUPPORT`,[-94]:`ESOCKTNOSUPPORT`,[-95]:`ENOTSUP`,[-96]:`EPFNOSUPPORT`,[-97]:`EAFNOSUPPORT`,[-98]:`EADDRINUSE`,[-99]:`EADDRNOTAVAIL`,[-100]:`ENETDOWN`,[-101]:`ENETUNREACH`,[-102]:`ENETRESET`,[-103]:`ECONNABORTED`,[-104]:`ECONNRESET`,[-105]:`ENOBUFS`,[-106]:`EISCONN`,[-107]:`ENOTCONN`,[-108]:`ESHUTDOWN`,[-109]:`ETOOMANYREFS`,[-110]:`ETIMEDOUT`,[-111]:`ECONNREFUSED`,[-112]:`EHOSTDOWN`,[-113]:`EHOSTUNREACH`,[-114]:`EALREADY`,[-115]:`EINPROGRESS`,[-116]:`ESTALE`,[-117]:`EUCLEAN`,[-118]:`ENOTNAM`,[-119]:`ENAVAIL`,[-120]:`EISNAM`,[-121]:`EREMOTEIO`,[-122]:`EDQUOT`,[-123]:`ENOMEDIUM`,[-124]:`EMEDIUMTYPE`,[-125]:`ECANCELED`,[-126]:`ENOKEY`,[-127]:`EKEYEXPIRED`,[-128]:`EKEYREVOKED`,[-129]:`EKEYREJECTED`},t={[-1]:`EPERM`,[-2]:`ENOENT`,[-3]:`ESRCH`,[-4]:`EINTR`,[-5]:`EIO`,[-6]:`ENXIO`,[-7]:`E2BIG`,[-8]:`ENOEXEC`,[-9]:`EBADF`,[-10]:`ECHILD`,[-11]:`EDEADLK`,[-12]:`ENOMEM`,[-13]:`EACCES`,[-14]:`EFAULT`,[-15]:`ENOTBLK`,[-16]:`EBUSY`,[-17]:`EEXIST`,[-18]:`EXDEV`,[-19]:`ENODEV`,[-20]:`ENOTDIR`,[-21]:`EISDIR`,[-22]:`EINVAL`,[-23]:`ENFILE`,[-24]:`EMFILE`,[-25]:`ENOTTY`,[-26]:`ETXTBSY`,[-27]:`EFBIG`,[-28]:`ENOSPC`,[-29]:`ESPIPE`,[-30]:`EROFS`,[-31]:`EMLINK`,[-32]:`EPIPE`,[-33]:`EDOM`,[-34]:`ERANGE`,[-35]:`EAGAIN`,[-36]:`EINPROGRESS`,[-37]:`EALREADY`,[-38]:`ENOTSOCK`,[-39]:`EDESTADDRREQ`,[-40]:`EMSGSIZE`,[-41]:`EPROTOTYPE`,[-42]:`ENOPROTOOPT`,[-43]:`EPROTONOSUPPORT`,[-44]:`ESOCKTNOSUPPORT`,[-45]:`ENOTSUP`,[-46]:`EPFNOSUPPORT`,[-47]:`EAFNOSUPPORT`,[-48]:`EADDRINUSE`,[-49]:`EADDRNOTAVAIL`,[-50]:`ENETDOWN`,[-51]:`ENETUNREACH`,[-52]:`ENETRESET`,[-53]:`ECONNABORTED`,[-54]:`ECONNRESET`,[-55]:`ENOBUFS`,[-56]:`EISCONN`,[-57]:`ENOTCONN`,[-58]:`ESHUTDOWN`,[-59]:`ETOOMANYREFS`,[-60]:`ETIMEDOUT`,[-61]:`ECONNREFUSED`,[-62]:`ELOOP`,[-63]:`ENAMETOOLONG`,[-64]:`EHOSTDOWN`,[-65]:`EHOSTUNREACH`,[-66]:`ENOTEMPTY`,[-67]:`EPROCLIM`,[-68]:`EUSERS`,[-69]:`EDQUOT`,[-70]:`ESTALE`,[-71]:`EREMOTE`,[-72]:`EBADRPC`,[-73]:`ERPCMISMATCH`,[-74]:`EPROGUNAVAIL`,[-75]:`EPROGMISMATCH`,[-76]:`EPROCUNAVAIL`,[-77]:`ENOLCK`,[-78]:`ENOSYS`,[-79]:`EFTYPE`,[-80]:`EAUTH`,[-81]:`ENEEDAUTH`,[-82]:`EPWROFF`,[-83]:`EDEVERR`,[-84]:`EOVERFLOW`,[-85]:`EBADEXEC`,[-86]:`EBADARCH`,[-87]:`ESHLIBVERS`,[-88]:`EBADMACHO`,[-89]:`ECANCELED`,[-90]:`EIDRM`,[-91]:`ENOMSG`,[-92]:`EILSEQ`,[-93]:`ENOATTR`,[-94]:`EBADMSG`,[-95]:`EMULTIHOP`,[-96]:`ENODATA`,[-97]:`ENOLINK`,[-98]:`ENOSR`,[-99]:`ENOSTR`,[-100]:`EPROTO`,[-101]:`ETIME`,[-102]:`EOPNOTSUPP`};function n(){return typeof globalThis.process?.platform==`string`?globalThis.process.platform:`linux`}function r(r){if(typeof r!=`number`)throw TypeError(`The "err" argument must be of type number. Received type `+typeof r);if(r>=0)throw RangeError(`The value of "err" is out of range. It must be a negative integer. Received ${r}`);return(n()===`darwin`?t:e)[r]||`Unknown system error ${r}`}function i(){let r=n()===`darwin`?t:e,i=new Map;for(let[e,t]of Object.entries(r))i.set(Number(e),[t,``]);return i}export{i as getSystemErrorMap,r as getSystemErrorName};
1
+ const e={[-1]:`EPERM`,[-2]:`ENOENT`,[-3]:`ESRCH`,[-4]:`EINTR`,[-5]:`EIO`,[-6]:`ENXIO`,[-7]:`E2BIG`,[-8]:`ENOEXEC`,[-9]:`EBADF`,[-10]:`ECHILD`,[-11]:`EAGAIN`,[-12]:`ENOMEM`,[-13]:`EACCES`,[-14]:`EFAULT`,[-15]:`ENOTBLK`,[-16]:`EBUSY`,[-17]:`EEXIST`,[-18]:`EXDEV`,[-19]:`ENODEV`,[-20]:`ENOTDIR`,[-21]:`EISDIR`,[-22]:`EINVAL`,[-23]:`ENFILE`,[-24]:`EMFILE`,[-25]:`ENOTTY`,[-26]:`ETXTBSY`,[-27]:`EFBIG`,[-28]:`ENOSPC`,[-29]:`ESPIPE`,[-30]:`EROFS`,[-31]:`EMLINK`,[-32]:`EPIPE`,[-33]:`EDOM`,[-34]:`ERANGE`,[-35]:`EDEADLK`,[-36]:`ENAMETOOLONG`,[-37]:`ENOLCK`,[-38]:`ENOSYS`,[-39]:`ENOTEMPTY`,[-40]:`ELOOP`,[-42]:`ENOMSG`,[-43]:`EIDRM`,[-44]:`ECHRNG`,[-45]:`EL2NSYNC`,[-46]:`EL3HLT`,[-47]:`EL3RST`,[-48]:`ELNRNG`,[-49]:`EUNATCH`,[-50]:`ENOCSI`,[-51]:`EL2HLT`,[-52]:`EBADE`,[-53]:`EBADR`,[-54]:`EXFULL`,[-55]:`ENOANO`,[-56]:`EBADRQC`,[-57]:`EBADSLT`,[-59]:`EBFONT`,[-60]:`ENOSTR`,[-61]:`ENODATA`,[-62]:`ETIME`,[-63]:`ENOSR`,[-64]:`ENONET`,[-65]:`ENOPKG`,[-66]:`EREMOTE`,[-67]:`ENOLINK`,[-68]:`EADV`,[-69]:`ESRMNT`,[-70]:`ECOMM`,[-71]:`EPROTO`,[-72]:`EMULTIHOP`,[-73]:`EDOTDOT`,[-74]:`EBADMSG`,[-75]:`EOVERFLOW`,[-76]:`ENOTUNIQ`,[-77]:`EBADFD`,[-78]:`EREMCHG`,[-79]:`ELIBACC`,[-80]:`ELIBBAD`,[-81]:`ELIBSCN`,[-82]:`ELIBMAX`,[-83]:`ELIBEXEC`,[-84]:`EILSEQ`,[-85]:`ERESTART`,[-86]:`ESTRPIPE`,[-87]:`EUSERS`,[-88]:`ENOTSOCK`,[-89]:`EDESTADDRREQ`,[-90]:`EMSGSIZE`,[-91]:`EPROTOTYPE`,[-92]:`ENOPROTOOPT`,[-93]:`EPROTONOSUPPORT`,[-94]:`ESOCKTNOSUPPORT`,[-95]:`ENOTSUP`,[-96]:`EPFNOSUPPORT`,[-97]:`EAFNOSUPPORT`,[-98]:`EADDRINUSE`,[-99]:`EADDRNOTAVAIL`,[-100]:`ENETDOWN`,[-101]:`ENETUNREACH`,[-102]:`ENETRESET`,[-103]:`ECONNABORTED`,[-104]:`ECONNRESET`,[-105]:`ENOBUFS`,[-106]:`EISCONN`,[-107]:`ENOTCONN`,[-108]:`ESHUTDOWN`,[-109]:`ETOOMANYREFS`,[-110]:`ETIMEDOUT`,[-111]:`ECONNREFUSED`,[-112]:`EHOSTDOWN`,[-113]:`EHOSTUNREACH`,[-114]:`EALREADY`,[-115]:`EINPROGRESS`,[-116]:`ESTALE`,[-117]:`EUCLEAN`,[-118]:`ENOTNAM`,[-119]:`ENAVAIL`,[-120]:`EISNAM`,[-121]:`EREMOTEIO`,[-122]:`EDQUOT`,[-123]:`ENOMEDIUM`,[-124]:`EMEDIUMTYPE`,[-125]:`ECANCELED`,[-126]:`ENOKEY`,[-127]:`EKEYEXPIRED`,[-128]:`EKEYREVOKED`,[-129]:`EKEYREJECTED`},t={[-1]:`EPERM`,[-2]:`ENOENT`,[-3]:`ESRCH`,[-4]:`EINTR`,[-5]:`EIO`,[-6]:`ENXIO`,[-7]:`E2BIG`,[-8]:`ENOEXEC`,[-9]:`EBADF`,[-10]:`ECHILD`,[-11]:`EDEADLK`,[-12]:`ENOMEM`,[-13]:`EACCES`,[-14]:`EFAULT`,[-15]:`ENOTBLK`,[-16]:`EBUSY`,[-17]:`EEXIST`,[-18]:`EXDEV`,[-19]:`ENODEV`,[-20]:`ENOTDIR`,[-21]:`EISDIR`,[-22]:`EINVAL`,[-23]:`ENFILE`,[-24]:`EMFILE`,[-25]:`ENOTTY`,[-26]:`ETXTBSY`,[-27]:`EFBIG`,[-28]:`ENOSPC`,[-29]:`ESPIPE`,[-30]:`EROFS`,[-31]:`EMLINK`,[-32]:`EPIPE`,[-33]:`EDOM`,[-34]:`ERANGE`,[-35]:`EAGAIN`,[-36]:`EINPROGRESS`,[-37]:`EALREADY`,[-38]:`ENOTSOCK`,[-39]:`EDESTADDRREQ`,[-40]:`EMSGSIZE`,[-41]:`EPROTOTYPE`,[-42]:`ENOPROTOOPT`,[-43]:`EPROTONOSUPPORT`,[-44]:`ESOCKTNOSUPPORT`,[-45]:`ENOTSUP`,[-46]:`EPFNOSUPPORT`,[-47]:`EAFNOSUPPORT`,[-48]:`EADDRINUSE`,[-49]:`EADDRNOTAVAIL`,[-50]:`ENETDOWN`,[-51]:`ENETUNREACH`,[-52]:`ENETRESET`,[-53]:`ECONNABORTED`,[-54]:`ECONNRESET`,[-55]:`ENOBUFS`,[-56]:`EISCONN`,[-57]:`ENOTCONN`,[-58]:`ESHUTDOWN`,[-59]:`ETOOMANYREFS`,[-60]:`ETIMEDOUT`,[-61]:`ECONNREFUSED`,[-62]:`ELOOP`,[-63]:`ENAMETOOLONG`,[-64]:`EHOSTDOWN`,[-65]:`EHOSTUNREACH`,[-66]:`ENOTEMPTY`,[-67]:`EPROCLIM`,[-68]:`EUSERS`,[-69]:`EDQUOT`,[-70]:`ESTALE`,[-71]:`EREMOTE`,[-72]:`EBADRPC`,[-73]:`ERPCMISMATCH`,[-74]:`EPROGUNAVAIL`,[-75]:`EPROGMISMATCH`,[-76]:`EPROCUNAVAIL`,[-77]:`ENOLCK`,[-78]:`ENOSYS`,[-79]:`EFTYPE`,[-80]:`EAUTH`,[-81]:`ENEEDAUTH`,[-82]:`EPWROFF`,[-83]:`EDEVERR`,[-84]:`EOVERFLOW`,[-85]:`EBADEXEC`,[-86]:`EBADARCH`,[-87]:`ESHLIBVERS`,[-88]:`EBADMACHO`,[-89]:`ECANCELED`,[-90]:`EIDRM`,[-91]:`ENOMSG`,[-92]:`EILSEQ`,[-93]:`ENOATTR`,[-94]:`EBADMSG`,[-95]:`EMULTIHOP`,[-96]:`ENODATA`,[-97]:`ENOLINK`,[-98]:`ENOSR`,[-99]:`ENOSTR`,[-100]:`EPROTO`,[-101]:`ETIME`,[-102]:`EOPNOTSUPP`};function getPlatform(){return typeof globalThis.process?.platform==`string`?globalThis.process.platform:`linux`}function getSystemErrorName(n){if(typeof n!=`number`)throw TypeError(`The "err" argument must be of type number. Received type `+typeof n);if(n>=0)throw RangeError(`The value of "err" is out of range. It must be a negative integer. Received ${n}`);return(getPlatform()===`darwin`?t:e)[n]||`Unknown system error ${n}`}function getSystemErrorMap(){let n=getPlatform()===`darwin`?t:e,r=new Map;for(let[e,t]of Object.entries(n))r.set(Number(e),[t,``]);return r}export{getSystemErrorMap,getSystemErrorName};
package/lib/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{getSystemErrorMap as e,getSystemErrorName as t}from"./errors.js";import{types_exports as n}from"./types.js";const r=Symbol.for(`nodejs.util.inspect.custom`);function i(e,t,n){if(e===null)return t.colors?`\x1B[1mnull\x1B[22m`:`null`;if(e===void 0)return t.colors?`\x1B[90mundefined\x1B[39m`:`undefined`;let s=t.depth??2;if(typeof e==`string`){let n=e.replace(/\\/g,`\\\\`);if(e.includes(`'`)&&!e.includes(`"`)){let e=n.replace(/"/g,`\\"`);return t.colors?`\x1b[32m"${e}"\x1b[39m`:`"${e}"`}let r=n.replace(/'/g,`\\'`);return t.colors?`\x1b[32m'${r}'\x1b[39m`:`'${r}'`}if(typeof e==`number`)return t.colors?`\x1b[33m${e}\x1b[39m`:String(e);if(typeof e==`bigint`)return t.colors?`\x1b[33m${e}n\x1b[39m`:`${e}n`;if(typeof e==`boolean`)return t.colors?`\x1b[33m${e}\x1b[39m`:String(e);if(typeof e==`symbol`)return t.colors?`\x1b[32m${e.toString()}\x1b[39m`:e.toString();if(typeof e==`function`){let n=e.name?`: ${e.name}`:``;return t.colors?`\x1b[36m[Function${n}]\x1b[39m`:`[Function${n}]`}if(typeof e==`object`&&e&&r in e){let a=e[r];if(typeof a==`function`){let r=a.call(e,n,t);return typeof r==`string`?r:i(r,t,n)}}if(e instanceof Date)return e.toISOString();if(e instanceof RegExp)return t.colors?`\x1b[31m${e.toString()}\x1b[39m`:e.toString();if(e instanceof Error)return e.stack||e.toString();if(n>s)return Array.isArray(e)?`[Array]`:`[Object]`;if(Array.isArray(e))return a(e,t,n);if(e instanceof Map){let r=[...e.entries()].map(([e,r])=>`${i(e,t,n+1)} => ${i(r,t,n+1)}`);return`Map(${e.size}) { ${r.join(`, `)} }`}if(e instanceof Set){let r=[...e].map(e=>i(e,t,n+1));return`Set(${e.size}) { ${r.join(`, `)} }`}if(ArrayBuffer.isView(e)&&!(e instanceof DataView)){let t=e.constructor?.name||`TypedArray`,n=Array.from(e);return`${t}(${n.length}) [ ${n.join(`, `)} ]`}return o(e,t,n)}function a(e,t,n){let r=t.maxArrayLength??100,a=Math.min(e.length,r),o=[];for(let r=0;r<a;r++)o.push(i(e[r],t,n+1));e.length>r&&o.push(`... ${e.length-r} more items`),t.showHidden&&o.push(`[length]: ${e.length}`);let s=t.breakLength??72,c=t.compact??3;if(typeof c==`number`&&c>0&&e.length>c){let e=e=>e.replace(/\x1b\[[0-9;]*m/g,``),t=Math.max(...o.map(t=>e(t).length)),n=Math.max(t-2,1),r=o.length,i=Math.min(Math.round(Math.sqrt(2.5*n*r)/n),Math.floor((s-2)/n),Math.floor((2.5+r-1)/2),15);if(i>1){let e=[];for(let t=0;t<r;t+=i)e.push(` `+o.slice(t,Math.min(t+i,r)).join(`, `));return`[\n${e.join(`,
2
- `)}\n]`}}let l=`[ ${o.join(`, `)} ]`;return l.length<=s?l:`[\n${o.map(e=>` `+e).join(`,
3
- `)}\n]`}function o(e,t,n){let r=t.showHidden?Object.getOwnPropertyNames(e):Object.keys(e);if(t.sorted&&r.sort(),r.length===0){let t=Object.prototype.toString.call(e);return t===`[object Object]`?`{}`:t}let a=r.map(r=>`${r}: ${i(e[r],t,n+1)}`),o=t.breakLength??72,s=`{ ${a.join(`, `)} }`;return s.length<=o?s:`{\n${a.map(e=>` `+e).join(`,
4
- `)}\n}`}function s(e,t){let n=typeof t==`boolean`?{showHidden:t}:{...t};return n.colors===void 0&&(n.colors=!1),i(e,n,0)}s.custom=r,s.defaultOptions={showHidden:!1,depth:2,colors:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:72,compact:3,sorted:!1},s.colors={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],framed:[51,54],overlined:[53,55],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},s.styles={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`,module:`underline`};function c(e,...t){if(e===void 0&&t.length===0)return``;if(typeof e!=`string`){if(t.length===0)return s(e);let n=[s(e)];for(let e of t)n.push(s(e));return n.join(` `)}let n=0,r=``,i=0;for(let a=0;a<e.length-1;a++){if(e[a]!==`%`)continue;a>i&&(r+=e.slice(i,a));let o=e[a+1];if(o===`%`){r+=`%`,i=a+2,a++;continue}if(n>=t.length){r+=`%`+o,i=a+2,a++;continue}let c=t[n];switch(o){case`s`:if(typeof c==`bigint`)r+=`${c}n`;else if(typeof c==`symbol`)r+=c.toString();else if(typeof c==`number`&&Object.is(c,-0))r+=`-0`;else if(typeof c==`object`&&c)if(Object.getPrototypeOf(c)===null||typeof c.toString==`function`&&c.toString!==Object.prototype.toString&&c.toString!==Array.prototype.toString)try{let e=c.toString();typeof e==`string`&&e!==`[object Object]`?r+=e:r+=s(c,{depth:0})}catch{r+=s(c,{depth:0})}else r+=s(c,{depth:0});else r+=String(c);n++;break;case`d`:if(typeof c==`bigint`)r+=`${c}n`;else if(typeof c==`symbol`)r+=`NaN`;else{let e=Number(c);r+=Object.is(e,-0)?`-0`:String(e)}n++;break;case`i`:if(typeof c==`bigint`)r+=`${c}n`;else if(typeof c==`symbol`)r+=`NaN`;else{let e=Number(c);if(!isFinite(e))r+=`NaN`;else{let t=Math.trunc(e);r+=Object.is(t,-0)?`-0`:String(t)}}n++;break;case`f`:if(typeof c==`bigint`)r+=Number(c).toString();else if(typeof c==`symbol`)r+=`NaN`;else{let e=parseFloat(String(c));r+=Object.is(e,-0)?`-0`:String(e)}n++;break;case`j`:try{r+=JSON.stringify(t[n++])}catch{r+=`[Circular]`}break;case`o`:r+=s(t[n++],{showHidden:!0,depth:4});break;case`O`:r+=s(t[n++],{depth:4});break;default:r+=`%`+o;break}i=a+2,a++}for(i<e.length&&(r+=e.slice(i));n<t.length;n++){let e=t[n];typeof e==`string`?r+=` `+e:r+=` `+s(e)}return r}function l(e,t,...n){return c(t,...n)}const u=RegExp(`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`,`g`);function d(e){if(typeof e!=`string`)throw TypeError(`The "str" argument must be of type string. Received `+typeof e);return e.indexOf(`\x1B`)===-1&&e.indexOf(`›`)===-1?e:e.replace(u,``)}function f(e,t,n){if(typeof t!=`string`)throw TypeError(`The "text" argument must be of type string. Received `+typeof t);if((n?.validateStream??!0)&&!(n?.stream??globalThis.process?.stdout)?.isTTY)return t;let r=Array.isArray(e)?e:[e],i=``,a=``;for(let e of r){if(e===`none`)continue;let t=s.colors[e];if(t===void 0)throw TypeError(`The "format" argument must be one of: ${Object.keys(s.colors).join(`, `)}. Received '${e}'`);i+=`[${t[0]}m`,a=`[${t[1]}m`+a}return`${i}${t}${a}`}const p=Symbol.for(`nodejs.util.promisify.custom`);function m(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);let t=e[p];if(typeof t==`function`)return t;function n(...t){return new Promise((n,r)=>{e.call(this,...t,(e,...t)=>{e?r(e):t.length<=1?n(t[0]):n(t)})})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperty(n,p,{value:n}),n}m.custom=p;function h(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);return function(...t){let n=t.pop();if(typeof n!=`function`)throw TypeError(`The last argument must be of type Function`);e.apply(this,t).then(e=>Promise.resolve().then(()=>n(null,e)),e=>Promise.resolve().then(()=>n(e||Error())))}}function g(e,t,n){let r=!1;function i(...i){if(!r){r=!0;let e=n?`[${n}] ${t}`:t;console.warn(`DeprecationWarning: ${e}`)}return e.apply(this,i)}return Object.setPrototypeOf(i,e),i}function _(e){let t;return(...n)=>{if(t===void 0){let n=typeof globalThis.process?.env?.NODE_DEBUG==`string`?globalThis.process.env.NODE_DEBUG:``;if(RegExp(`\\b${e}\\b`,`i`).test(n)){let n=typeof globalThis.process?.pid==`number`?globalThis.process.pid:0;t=(...t)=>{console.error(`${e.toUpperCase()} ${n}:`,...t)}}else t=()=>{}}t(...n)}}function v(e,t){if(e==null){let t=TypeError(`The "ctor" argument must be of type Function. Received `+String(e));throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(t==null){let e=TypeError(`The "superCtor" argument must be of type Function. Received `+String(t));throw e.code=`ERR_INVALID_ARG_TYPE`,e}if(t.prototype===void 0){let e=TypeError(`The "superCtor.prototype" property must not be undefined`);throw e.code=`ERR_INVALID_ARG_TYPE`,e}Object.defineProperty(e,`super_`,{value:t,writable:!0,configurable:!0}),Object.setPrototypeOf(e.prototype,t.prototype)}function y(e){return typeof e==`boolean`}function b(e){return e===null}function x(e){return e==null}function S(e){return typeof e==`number`}function C(e){return typeof e==`string`}function w(e){return typeof e==`symbol`}function T(e){return e===void 0}function E(e){return typeof e==`object`&&!!e}function D(e){return e instanceof Error}function O(e){return typeof e==`function`}function k(e){return e instanceof RegExp}function A(e){return Array.isArray(e)}function j(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function M(e){return e instanceof Date}function N(e){return e instanceof Uint8Array&&e.constructor?.name===`Buffer`}const P=globalThis.TextDecoder,F=globalThis.TextEncoder;function I(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t||e===null||t===null||typeof e!=`object`)return!1;let n=e,r=t;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!I(n[e],r[e]))return!1;return!0}if(Array.isArray(n)!==Array.isArray(r))return!1;if(n instanceof Date&&r instanceof Date)return n.getTime()===r.getTime();if(n instanceof RegExp&&r instanceof RegExp)return n.source===r.source&&n.flags===r.flags;let i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e of i)if(!Object.prototype.hasOwnProperty.call(r,e)||!I(n[e],r[e]))return!1;return!0}function L(e){return typeof e.toWellFormed==`function`?e.toWellFormed():e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,`�`)}var R={format:c,formatWithOptions:l,styleText:f,stripVTControlCharacters:d,inspect:s,promisify:m,callbackify:h,deprecate:g,debuglog:_,inherits:v,types:n,isBoolean:y,isNull:b,isNullOrUndefined:x,isNumber:S,isString:C,isSymbol:w,isUndefined:T,isObject:E,isError:D,isFunction:O,isRegExp:k,isArray:A,isPrimitive:j,isDate:M,isBuffer:N,isDeepStrictEqual:I,toUSVString:L,TextDecoder:globalThis.TextDecoder,TextEncoder:globalThis.TextEncoder,getSystemErrorName:t,getSystemErrorMap:e};export{P as TextDecoder,F as TextEncoder,h as callbackify,_ as debuglog,R as default,g as deprecate,c as format,l as formatWithOptions,e as getSystemErrorMap,t as getSystemErrorName,v as inherits,s as inspect,A as isArray,y as isBoolean,N as isBuffer,M as isDate,I as isDeepStrictEqual,D as isError,O as isFunction,b as isNull,x as isNullOrUndefined,S as isNumber,E as isObject,j as isPrimitive,k as isRegExp,C as isString,w as isSymbol,T as isUndefined,m as promisify,d as stripVTControlCharacters,f as styleText,L as toUSVString,n as types};
1
+ import{getSystemErrorMap as e,getSystemErrorName as t}from"./errors.js";import{types_exports as n}from"./types.js";const r=Symbol.for(`nodejs.util.inspect.custom`);function inspectValue(e,t,n){if(e===null)return t.colors?`\x1B[1mnull\x1B[22m`:`null`;if(e===void 0)return t.colors?`\x1B[90mundefined\x1B[39m`:`undefined`;let i=t.depth??2;if(typeof e==`string`){let n=e.replace(/\\/g,`\\\\`);if(e.includes(`'`)&&!e.includes(`"`)){let e=n.replace(/"/g,`\\"`);return t.colors?`\x1b[32m"${e}"\x1b[39m`:`"${e}"`}let r=n.replace(/'/g,`\\'`);return t.colors?`\x1b[32m'${r}'\x1b[39m`:`'${r}'`}if(typeof e==`number`)return t.colors?`\x1b[33m${e}\x1b[39m`:String(e);if(typeof e==`bigint`)return t.colors?`\x1b[33m${e}n\x1b[39m`:`${e}n`;if(typeof e==`boolean`)return t.colors?`\x1b[33m${e}\x1b[39m`:String(e);if(typeof e==`symbol`)return t.colors?`\x1b[32m${e.toString()}\x1b[39m`:e.toString();if(typeof e==`function`){let n=e.name?`: ${e.name}`:``;return t.colors?`\x1b[36m[Function${n}]\x1b[39m`:`[Function${n}]`}if(typeof e==`object`&&e&&r in e){let i=e[r];if(typeof i==`function`){let r=i.call(e,n,t);return typeof r==`string`?r:inspectValue(r,t,n)}}if(e instanceof Date)return e.toISOString();if(e instanceof RegExp)return t.colors?`\x1b[31m${e.toString()}\x1b[39m`:e.toString();if(e instanceof Error)return e.stack||e.toString();if(n>i)return Array.isArray(e)?`[Array]`:`[Object]`;if(Array.isArray(e))return inspectArray(e,t,n);if(e instanceof Map){let r=[...e.entries()].map(([e,r])=>`${inspectValue(e,t,n+1)} => ${inspectValue(r,t,n+1)}`);return`Map(${e.size}) { ${r.join(`, `)} }`}if(e instanceof Set){let r=[...e].map(e=>inspectValue(e,t,n+1));return`Set(${e.size}) { ${r.join(`, `)} }`}if(ArrayBuffer.isView(e)&&!(e instanceof DataView)){let t=e.constructor?.name||`TypedArray`,n=Array.from(e);return`${t}(${n.length}) [ ${n.join(`, `)} ]`}return inspectObject(e,t,n)}function inspectArray(e,t,n){let r=t.maxArrayLength??100,i=Math.min(e.length,r),a=[];for(let r=0;r<i;r++)a.push(inspectValue(e[r],t,n+1));e.length>r&&a.push(`... ${e.length-r} more items`),t.showHidden&&a.push(`[length]: ${e.length}`);let o=t.breakLength??72,s=t.compact??3;if(typeof s==`number`&&s>0&&e.length>s){let stripAnsi=e=>e.replace(/\x1b\[[0-9;]*m/g,``),e=Math.max(...a.map(e=>stripAnsi(e).length)),t=Math.max(e-2,1),n=a.length,r=Math.min(Math.round(Math.sqrt(2.5*t*n)/t),Math.floor((o-2)/t),Math.floor((2.5+n-1)/2),15);if(r>1){let e=[];for(let t=0;t<n;t+=r)e.push(` `+a.slice(t,Math.min(t+r,n)).join(`, `));return`[\n${e.join(`,
2
+ `)}\n]`}}let c=`[ ${a.join(`, `)} ]`;return c.length<=o?c:`[\n${a.map(e=>` `+e).join(`,
3
+ `)}\n]`}function inspectObject(e,t,n){let r=t.showHidden?Object.getOwnPropertyNames(e):Object.keys(e);if(t.sorted&&r.sort(),r.length===0){let t=Object.prototype.toString.call(e);return t===`[object Object]`?`{}`:t}let i=r.map(r=>`${r}: ${inspectValue(e[r],t,n+1)}`),a=t.breakLength??72,o=`{ ${i.join(`, `)} }`;return o.length<=a?o:`{\n${i.map(e=>` `+e).join(`,
4
+ `)}\n}`}function inspect(e,t){let n=typeof t==`boolean`?{showHidden:t}:{...t};return n.colors===void 0&&(n.colors=!1),inspectValue(e,n,0)}inspect.custom=r,inspect.defaultOptions={showHidden:!1,depth:2,colors:!1,maxArrayLength:100,maxStringLength:1e4,breakLength:72,compact:3,sorted:!1},inspect.colors={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],blink:[5,25],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],doubleunderline:[21,24],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],framed:[51,54],overlined:[53,55],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},inspect.styles={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`,module:`underline`};function format(e,...t){if(e===void 0&&t.length===0)return``;if(typeof e!=`string`){if(t.length===0)return inspect(e);let n=[inspect(e)];for(let e of t)n.push(inspect(e));return n.join(` `)}let n=0,r=``,i=0;for(let a=0;a<e.length-1;a++){if(e[a]!==`%`)continue;a>i&&(r+=e.slice(i,a));let o=e[a+1];if(o===`%`){r+=`%`,i=a+2,a++;continue}if(n>=t.length){r+=`%`+o,i=a+2,a++;continue}let s=t[n];switch(o){case`s`:if(typeof s==`bigint`)r+=`${s}n`;else if(typeof s==`symbol`)r+=s.toString();else if(typeof s==`number`&&Object.is(s,-0))r+=`-0`;else if(typeof s==`object`&&s)if(Object.getPrototypeOf(s)===null||typeof s.toString==`function`&&s.toString!==Object.prototype.toString&&s.toString!==Array.prototype.toString)try{let e=s.toString();typeof e==`string`&&e!==`[object Object]`?r+=e:r+=inspect(s,{depth:0})}catch{r+=inspect(s,{depth:0})}else r+=inspect(s,{depth:0});else r+=String(s);n++;break;case`d`:if(typeof s==`bigint`)r+=`${s}n`;else if(typeof s==`symbol`)r+=`NaN`;else{let e=Number(s);r+=Object.is(e,-0)?`-0`:String(e)}n++;break;case`i`:if(typeof s==`bigint`)r+=`${s}n`;else if(typeof s==`symbol`)r+=`NaN`;else{let e=Number(s);if(!isFinite(e))r+=`NaN`;else{let t=Math.trunc(e);r+=Object.is(t,-0)?`-0`:String(t)}}n++;break;case`f`:if(typeof s==`bigint`)r+=Number(s).toString();else if(typeof s==`symbol`)r+=`NaN`;else{let e=parseFloat(String(s));r+=Object.is(e,-0)?`-0`:String(e)}n++;break;case`j`:try{r+=JSON.stringify(t[n++])}catch{r+=`[Circular]`}break;case`o`:r+=inspect(t[n++],{showHidden:!0,depth:4});break;case`O`:r+=inspect(t[n++],{depth:4});break;default:r+=`%`+o;break}i=a+2,a++}for(i<e.length&&(r+=e.slice(i));n<t.length;n++){let e=t[n];typeof e==`string`?r+=` `+e:r+=` `+inspect(e)}return r}function formatWithOptions(e,t,...n){return format(t,...n)}const i=RegExp(`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/\\#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`,`g`);function stripVTControlCharacters(e){if(typeof e!=`string`)throw TypeError(`The "str" argument must be of type string. Received `+typeof e);return e.indexOf(`\x1B`)===-1&&e.indexOf(`›`)===-1?e:e.replace(i,``)}function styleText(e,t,n){if(typeof t!=`string`)throw TypeError(`The "text" argument must be of type string. Received `+typeof t);if((n?.validateStream??!0)&&!(n?.stream??globalThis.process?.stdout)?.isTTY)return t;let r=Array.isArray(e)?e:[e],i=``,a=``;for(let e of r){if(e===`none`)continue;let t=inspect.colors[e];if(t===void 0)throw TypeError(`The "format" argument must be one of: ${Object.keys(inspect.colors).join(`, `)}. Received '${e}'`);i+=`[${t[0]}m`,a=`[${t[1]}m`+a}return`${i}${t}${a}`}const a=Symbol.for(`nodejs.util.promisify.custom`);function promisify(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);let t=e[a];if(typeof t==`function`)return t;function promisified(...t){return new Promise((n,r)=>{e.call(this,...t,(e,...t)=>{e?r(e):t.length<=1?n(t[0]):n(t)})})}return Object.setPrototypeOf(promisified,Object.getPrototypeOf(e)),Object.defineProperty(promisified,a,{value:promisified}),promisified}promisify.custom=a;function callbackify(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type Function`);return function(...t){let n=t.pop();if(typeof n!=`function`)throw TypeError(`The last argument must be of type Function`);e.apply(this,t).then(e=>Promise.resolve().then(()=>n(null,e)),e=>Promise.resolve().then(()=>n(e||Error())))}}function deprecate(e,t,n){let r=!1;function deprecated(...i){if(!r){r=!0;let e=n?`[${n}] ${t}`:t;console.warn(`DeprecationWarning: ${e}`)}return e.apply(this,i)}return Object.setPrototypeOf(deprecated,e),deprecated}function debuglog(e){let debug;return(...t)=>{if(debug===void 0){let t=typeof globalThis.process?.env?.NODE_DEBUG==`string`?globalThis.process.env.NODE_DEBUG:``;if(RegExp(`\\b${e}\\b`,`i`).test(t)){let t=typeof globalThis.process?.pid==`number`?globalThis.process.pid:0;debug=(...n)=>{console.error(`${e.toUpperCase()} ${t}:`,...n)}}else debug=()=>{}}debug(...t)}}function inherits(e,t){if(e==null){let t=TypeError(`The "ctor" argument must be of type Function. Received `+String(e));throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(t==null){let e=TypeError(`The "superCtor" argument must be of type Function. Received `+String(t));throw e.code=`ERR_INVALID_ARG_TYPE`,e}if(t.prototype===void 0){let e=TypeError(`The "superCtor.prototype" property must not be undefined`);throw e.code=`ERR_INVALID_ARG_TYPE`,e}Object.defineProperty(e,`super_`,{value:t,writable:!0,configurable:!0}),Object.setPrototypeOf(e.prototype,t.prototype)}function isBoolean(e){return typeof e==`boolean`}function isNull(e){return e===null}function isNullOrUndefined(e){return e==null}function isNumber(e){return typeof e==`number`}function isString(e){return typeof e==`string`}function isSymbol(e){return typeof e==`symbol`}function isUndefined(e){return e===void 0}function isObject(e){return typeof e==`object`&&!!e}function isError(e){return e instanceof Error}function isFunction(e){return typeof e==`function`}function isRegExp(e){return e instanceof RegExp}function isArray(e){return Array.isArray(e)}function isPrimitive(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function isDate(e){return e instanceof Date}function isBuffer(e){return e instanceof Uint8Array&&e.constructor?.name===`Buffer`}const o=globalThis.TextDecoder,s=globalThis.TextEncoder;function isDeepStrictEqual(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t||e===null||t===null||typeof e!=`object`)return!1;let n=e,r=t;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!isDeepStrictEqual(n[e],r[e]))return!1;return!0}if(Array.isArray(n)!==Array.isArray(r))return!1;if(n instanceof Date&&r instanceof Date)return n.getTime()===r.getTime();if(n instanceof RegExp&&r instanceof RegExp)return n.source===r.source&&n.flags===r.flags;let i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e of i)if(!Object.prototype.hasOwnProperty.call(r,e)||!isDeepStrictEqual(n[e],r[e]))return!1;return!0}function toUSVString(e){return typeof e.toWellFormed==`function`?e.toWellFormed():e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,`�`)}var c={format,formatWithOptions,styleText,stripVTControlCharacters,inspect,promisify,callbackify,deprecate,debuglog,inherits,types:n,isBoolean,isNull,isNullOrUndefined,isNumber,isString,isSymbol,isUndefined,isObject,isError,isFunction,isRegExp,isArray,isPrimitive,isDate,isBuffer,isDeepStrictEqual,toUSVString,TextDecoder:globalThis.TextDecoder,TextEncoder:globalThis.TextEncoder,getSystemErrorName:t,getSystemErrorMap:e};export{o as TextDecoder,s as TextEncoder,callbackify,debuglog,c as default,deprecate,format,formatWithOptions,e as getSystemErrorMap,t as getSystemErrorName,inherits,inspect,isArray,isBoolean,isBuffer,isDate,isDeepStrictEqual,isError,isFunction,isNull,isNullOrUndefined,isNumber,isObject,isPrimitive,isRegExp,isString,isSymbol,isUndefined,promisify,stripVTControlCharacters,styleText,toUSVString,n as types};
@@ -1 +1 @@
1
- const e=Object.prototype.toString,t=BigInt.prototype.valueOf,n=Boolean.prototype.valueOf,r=Date.prototype.valueOf,i=Number.prototype.valueOf,ee=String.prototype.valueOf,te=Symbol.prototype.valueOf,a=WeakMap.prototype.has,o=WeakSet.prototype.has,s=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,`byteLength`).get,c=typeof SharedArrayBuffer<`u`?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,`byteLength`).get:void 0,l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get,u=Object.getOwnPropertyDescriptor(Set.prototype,`size`).get,d=Object.getOwnPropertyDescriptor(Map.prototype,`size`).get;function f(e){return typeof e==`object`&&!!e}function p(e){return m(e)||h(e)}function m(e){try{return s.call(e),!0}catch{return!1}}function h(e){if(c===void 0)return!1;try{return c.call(e),!0}catch{return!1}}function g(e){return ArrayBuffer.isView(e)}function _(e){return l.call(e)!==void 0}function v(e){return l.call(e)===`Uint8Array`}function y(e){return l.call(e)===`Uint8ClampedArray`}function b(e){return l.call(e)===`Uint16Array`}function x(e){return l.call(e)===`Uint32Array`}function S(e){return l.call(e)===`Int8Array`}function C(e){return l.call(e)===`Int16Array`}function w(e){return l.call(e)===`Int32Array`}function T(e){return l.call(e)===`Float32Array`}function E(e){return l.call(e)===`Float64Array`}function D(e){return l.call(e)===`BigInt64Array`}function O(e){return l.call(e)===`BigUint64Array`}function k(e){return ArrayBuffer.isView(e)&&l.call(e)===void 0}function A(e){try{return d.call(e),!0}catch{return!1}}function j(e){try{return u.call(e),!0}catch{return!1}}function M(e){try{return a.call(e,null),!0}catch{return!1}}function N(e){try{return o.call(e,null),!0}catch{return!1}}function P(e){return f(e)&&e[Symbol.toStringTag]===`Map Iterator`}function F(e){return f(e)&&e[Symbol.toStringTag]===`Set Iterator`}function I(e){try{return r.call(e),!0}catch{return!1}}function L(t){return f(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object RegExp]`}function R(t){return f(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object Error]`}function z(e){return typeof e==`function`&&e[Symbol.toStringTag]===`AsyncFunction`}function B(e){return typeof e==`function`&&e[Symbol.toStringTag]===`GeneratorFunction`}function V(e){return f(e)&&e[Symbol.toStringTag]===`Generator`}function H(e){return f(e)&&e[Symbol.toStringTag]===`Promise`}function U(e){if(!f(e))return!1;try{return n.call(e),!0}catch{return!1}}function W(e){if(!f(e))return!1;try{return i.call(e),!0}catch{return!1}}function G(e){if(!f(e))return!1;try{return ee.call(e),!0}catch{return!1}}function K(e){if(!f(e))return!1;try{return te.call(e),!0}catch{return!1}}function q(e){if(!f(e))return!1;try{return t.call(e),!0}catch{return!1}}function J(e){return U(e)||G(e)||W(e)||K(e)||q(e)}function Y(t){return f(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object Arguments]`}function X(e){return f(e)&&e[Symbol.toStringTag]===`Module`}function Z(e){return!1}function Q(t){return f(t)&&e.call(t)===`[object CryptoKey]`}function $(e){return!1}const ne={isAnyArrayBuffer:p,isArrayBuffer:m,isArrayBufferView:g,isArgumentsObject:Y,isAsyncFunction:z,isBigInt64Array:D,isBigUint64Array:O,isBigIntObject:q,isBooleanObject:U,isBoxedPrimitive:J,isCryptoKey:Q,isDataView:k,isDate:I,isFloat32Array:T,isFloat64Array:E,isGeneratorFunction:B,isGeneratorObject:V,isInt8Array:S,isInt16Array:C,isInt32Array:w,isKeyObject:$,isMap:A,isMapIterator:P,isModuleNamespaceObject:X,isNativeError:R,isNumberObject:W,isPromise:H,isProxy:Z,isRegExp:L,isSet:j,isSetIterator:F,isSharedArrayBuffer:h,isStringObject:G,isSymbolObject:K,isTypedArray:_,isUint8Array:v,isUint8ClampedArray:y,isUint16Array:b,isUint32Array:x,isWeakMap:M,isWeakSet:N};export{ne as default,p as isAnyArrayBuffer,Y as isArgumentsObject,m as isArrayBuffer,g as isArrayBufferView,z as isAsyncFunction,D as isBigInt64Array,q as isBigIntObject,O as isBigUint64Array,U as isBooleanObject,J as isBoxedPrimitive,Q as isCryptoKey,k as isDataView,I as isDate,T as isFloat32Array,E as isFloat64Array,B as isGeneratorFunction,V as isGeneratorObject,C as isInt16Array,w as isInt32Array,S as isInt8Array,$ as isKeyObject,A as isMap,P as isMapIterator,X as isModuleNamespaceObject,R as isNativeError,W as isNumberObject,H as isPromise,Z as isProxy,L as isRegExp,j as isSet,F as isSetIterator,h as isSharedArrayBuffer,G as isStringObject,K as isSymbolObject,_ as isTypedArray,b as isUint16Array,x as isUint32Array,v as isUint8Array,y as isUint8ClampedArray,M as isWeakMap,N as isWeakSet};
1
+ const e=Object.prototype.toString,t=BigInt.prototype.valueOf,n=Boolean.prototype.valueOf,r=Date.prototype.valueOf,i=Number.prototype.valueOf,a=String.prototype.valueOf,o=Symbol.prototype.valueOf,s=WeakMap.prototype.has,c=WeakSet.prototype.has,l=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,`byteLength`).get,u=typeof SharedArrayBuffer<`u`?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,`byteLength`).get:void 0,d=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get,f=Object.getOwnPropertyDescriptor(Set.prototype,`size`).get,p=Object.getOwnPropertyDescriptor(Map.prototype,`size`).get;function isObjectLike(e){return typeof e==`object`&&!!e}function isAnyArrayBuffer(e){return isArrayBuffer(e)||isSharedArrayBuffer(e)}function isArrayBuffer(e){try{return l.call(e),!0}catch{return!1}}function isSharedArrayBuffer(e){if(u===void 0)return!1;try{return u.call(e),!0}catch{return!1}}function isArrayBufferView(e){return ArrayBuffer.isView(e)}function isTypedArray(e){return d.call(e)!==void 0}function isUint8Array(e){return d.call(e)===`Uint8Array`}function isUint8ClampedArray(e){return d.call(e)===`Uint8ClampedArray`}function isUint16Array(e){return d.call(e)===`Uint16Array`}function isUint32Array(e){return d.call(e)===`Uint32Array`}function isInt8Array(e){return d.call(e)===`Int8Array`}function isInt16Array(e){return d.call(e)===`Int16Array`}function isInt32Array(e){return d.call(e)===`Int32Array`}function isFloat32Array(e){return d.call(e)===`Float32Array`}function isFloat64Array(e){return d.call(e)===`Float64Array`}function isBigInt64Array(e){return d.call(e)===`BigInt64Array`}function isBigUint64Array(e){return d.call(e)===`BigUint64Array`}function isDataView(e){return ArrayBuffer.isView(e)&&d.call(e)===void 0}function isMap(e){try{return p.call(e),!0}catch{return!1}}function isSet(e){try{return f.call(e),!0}catch{return!1}}function isWeakMap(e){try{return s.call(e,null),!0}catch{return!1}}function isWeakSet(e){try{return c.call(e,null),!0}catch{return!1}}function isMapIterator(e){return isObjectLike(e)&&e[Symbol.toStringTag]===`Map Iterator`}function isSetIterator(e){return isObjectLike(e)&&e[Symbol.toStringTag]===`Set Iterator`}function isDate(e){try{return r.call(e),!0}catch{return!1}}function isRegExp(t){return isObjectLike(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object RegExp]`}function isNativeError(t){return isObjectLike(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object Error]`}function isAsyncFunction(e){return typeof e==`function`&&e[Symbol.toStringTag]===`AsyncFunction`}function isGeneratorFunction(e){return typeof e==`function`&&e[Symbol.toStringTag]===`GeneratorFunction`}function isGeneratorObject(e){return isObjectLike(e)&&e[Symbol.toStringTag]===`Generator`}function isPromise(e){return isObjectLike(e)&&e[Symbol.toStringTag]===`Promise`}function isBooleanObject(e){if(!isObjectLike(e))return!1;try{return n.call(e),!0}catch{return!1}}function isNumberObject(e){if(!isObjectLike(e))return!1;try{return i.call(e),!0}catch{return!1}}function isStringObject(e){if(!isObjectLike(e))return!1;try{return a.call(e),!0}catch{return!1}}function isSymbolObject(e){if(!isObjectLike(e))return!1;try{return o.call(e),!0}catch{return!1}}function isBigIntObject(e){if(!isObjectLike(e))return!1;try{return t.call(e),!0}catch{return!1}}function isBoxedPrimitive(e){return isBooleanObject(e)||isStringObject(e)||isNumberObject(e)||isSymbolObject(e)||isBigIntObject(e)}function isArgumentsObject(t){return isObjectLike(t)&&t[Symbol.toStringTag]===void 0&&e.call(t)===`[object Arguments]`}function isModuleNamespaceObject(e){return isObjectLike(e)&&e[Symbol.toStringTag]===`Module`}function isProxy(e){return!1}function isCryptoKey(t){return isObjectLike(t)&&e.call(t)===`[object CryptoKey]`}function isKeyObject(e){return!1}const m={isAnyArrayBuffer,isArrayBuffer,isArrayBufferView,isArgumentsObject,isAsyncFunction,isBigInt64Array,isBigUint64Array,isBigIntObject,isBooleanObject,isBoxedPrimitive,isCryptoKey,isDataView,isDate,isFloat32Array,isFloat64Array,isGeneratorFunction,isGeneratorObject,isInt8Array,isInt16Array,isInt32Array,isKeyObject,isMap,isMapIterator,isModuleNamespaceObject,isNativeError,isNumberObject,isPromise,isProxy,isRegExp,isSet,isSetIterator,isSharedArrayBuffer,isStringObject,isSymbolObject,isTypedArray,isUint8Array,isUint8ClampedArray,isUint16Array,isUint32Array,isWeakMap,isWeakSet};export{m as default,isAnyArrayBuffer,isArgumentsObject,isArrayBuffer,isArrayBufferView,isAsyncFunction,isBigInt64Array,isBigIntObject,isBigUint64Array,isBooleanObject,isBoxedPrimitive,isCryptoKey,isDataView,isDate,isFloat32Array,isFloat64Array,isGeneratorFunction,isGeneratorObject,isInt16Array,isInt32Array,isInt8Array,isKeyObject,isMap,isMapIterator,isModuleNamespaceObject,isNativeError,isNumberObject,isPromise,isProxy,isRegExp,isSet,isSetIterator,isSharedArrayBuffer,isStringObject,isSymbolObject,isTypedArray,isUint16Array,isUint32Array,isUint8Array,isUint8ClampedArray,isWeakMap,isWeakSet};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/util",
3
- "version": "0.3.19",
3
+ "version": "0.3.21",
4
4
  "description": "Node.js util module for Gjs",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -34,8 +34,8 @@
34
34
  "util"
35
35
  ],
36
36
  "devDependencies": {
37
- "@gjsify/cli": "^0.3.19",
38
- "@gjsify/unit": "^0.3.19",
37
+ "@gjsify/cli": "^0.3.21",
38
+ "@gjsify/unit": "^0.3.21",
39
39
  "@types/inherits": "^2.0.0",
40
40
  "@types/node": "^25.6.2",
41
41
  "typescript": "^6.0.3"