@rzl-zone/utils-js 3.1.1-beta.0 → 3.1.1
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.
- package/README.md +56 -27
- package/dist/assertions/index.cjs +1 -1
- package/dist/assertions/index.js +1 -1
- package/dist/chunk-26XIKDJI.cjs +1 -0
- package/dist/chunk-2NWHDDM5.js +1 -0
- package/dist/chunk-2UIRWYE3.js +1 -0
- package/dist/chunk-4VCRMMAH.cjs +1 -0
- package/dist/chunk-5C2SMIGX.cjs +1 -0
- package/dist/chunk-5I2B5DOG.js +1 -0
- package/dist/chunk-5Y52H4VH.cjs +1 -0
- package/dist/chunk-7BXIZM57.cjs +1 -0
- package/dist/chunk-7H7IODCQ.cjs +1 -0
- package/dist/chunk-7KJBDGEP.js +1 -0
- package/dist/chunk-7PG6YKIY.cjs +1 -0
- package/dist/chunk-7YVINA3U.cjs +1 -0
- package/dist/chunk-AXWJJXJC.js +1 -0
- package/dist/chunk-CPLBRGST.js +1 -0
- package/dist/chunk-DQFU3KLE.cjs +1 -0
- package/dist/chunk-DUK2K4FB.js +1 -0
- package/dist/chunk-DVMHRLKP.cjs +1 -0
- package/dist/chunk-EBMHQW7X.cjs +1 -0
- package/dist/chunk-EXWCTDC3.cjs +1 -0
- package/dist/chunk-FIAAX3UE.js +1 -0
- package/dist/chunk-G2B35D5W.js +1 -0
- package/dist/chunk-GLUYWYOA.cjs +1 -0
- package/dist/chunk-GRSCNTOK.js +1 -0
- package/dist/chunk-I5X5IN4H.js +1 -0
- package/dist/chunk-I6NOFGAK.cjs +1 -0
- package/dist/chunk-INUFZJLX.cjs +1 -0
- package/dist/chunk-IRBPXCMR.js +1 -0
- package/dist/chunk-J2RGTPGK.cjs +1 -0
- package/dist/chunk-KHO2SBNA.cjs +1 -0
- package/dist/chunk-KXIXXSWX.cjs +1 -0
- package/dist/chunk-L73TOPX5.js +1 -0
- package/dist/chunk-MC3LXMCQ.js +1 -0
- package/dist/chunk-MHXVVDRQ.cjs +1 -0
- package/dist/chunk-MMSYCIJ2.cjs +1 -1
- package/dist/chunk-NHNBV5VS.cjs +1 -0
- package/dist/chunk-NXWPZDDX.js +1 -0
- package/dist/chunk-ODZQXH7E.cjs +1 -0
- package/dist/chunk-ONZFBJVW.js +1 -0
- package/dist/chunk-Q6NHYWVX.js +1 -0
- package/dist/chunk-QNKGP5DY.js +1 -0
- package/dist/chunk-QVRTHAM2.js +1 -0
- package/dist/chunk-RF34NETZ.js +1 -0
- package/dist/chunk-SAW7XS4K.js +1 -0
- package/dist/chunk-TSLYDPBJ.js +1 -0
- package/dist/chunk-UDA26MCU.cjs +1 -0
- package/dist/chunk-UET567YM.cjs +1 -0
- package/dist/chunk-URGK5UQT.js +1 -0
- package/dist/chunk-VEYMQ3UA.js +1 -0
- package/dist/chunk-W2W3L2M5.js +1 -0
- package/dist/chunk-WFPQO7KN.js +1 -0
- package/dist/chunk-WVSPXFTY.js +1 -0
- package/dist/chunk-WZE3XLKY.cjs +1 -0
- package/dist/chunk-X4PD3I5U.js +1 -0
- package/dist/chunk-XC2PYCT4.cjs +1 -0
- package/dist/chunk-XIXA5KDF.cjs +1 -0
- package/dist/chunk-XSFPU3YT.js +1 -0
- package/dist/chunk-XVHPXRUH.cjs +1 -0
- package/dist/chunk-Y44ZD3GG.js +1 -0
- package/dist/chunk-Y4O5KZF6.cjs +1 -0
- package/dist/chunk-YT3MSZKK.cjs +1 -0
- package/dist/chunk-YZR5OGJA.cjs +1 -0
- package/dist/chunk-ZR7GTJQX.cjs +1 -0
- package/dist/chunk-ZXIWDFEQ.js +1 -0
- package/dist/conversions/index.cjs +1 -1
- package/dist/conversions/index.d.ts +175 -40
- package/dist/conversions/index.js +1 -1
- package/dist/env/index.cjs +1 -1
- package/dist/env/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.js +1 -1
- package/dist/formatting/index.cjs +1 -1
- package/dist/formatting/index.js +1 -1
- package/dist/generator/index.cjs +1 -1
- package/dist/generator/index.js +1 -1
- package/dist/{is-array--YjXV-Wx.d.ts → is-array-Cymwrsmm.d.ts} +2 -90
- package/dist/next/index.cjs +1 -8
- package/dist/next/index.js +1 -8
- package/dist/next/server/index.cjs +1 -2
- package/dist/next/server/index.js +1 -2
- package/dist/operations/index.cjs +1 -1
- package/dist/operations/index.js +1 -1
- package/dist/or-DyZCRvaU.d.ts +89 -0
- package/dist/parsers/index.cjs +1 -1
- package/dist/parsers/index.js +1 -1
- package/dist/predicates/index.cjs +1 -1
- package/dist/predicates/index.d.ts +111 -17
- package/dist/predicates/index.js +1 -1
- package/dist/promise/index.cjs +1 -1
- package/dist/promise/index.js +1 -1
- package/dist/rzl-utils.global.js +1 -4
- package/dist/strings/index.cjs +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/tailwind/index.cjs +1 -0
- package/dist/tailwind/index.d.ts +565 -0
- package/dist/tailwind/index.js +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/urls/index.cjs +1 -1
- package/dist/urls/index.js +1 -1
- package/package.json +24 -23
- package/dist/chunk-26W3VZIK.cjs +0 -1
- package/dist/chunk-2KRCHXFG.cjs +0 -2
- package/dist/chunk-33ZLH266.js +0 -1
- package/dist/chunk-4L4EJTNZ.js +0 -1
- package/dist/chunk-56QBKKRE.js +0 -1
- package/dist/chunk-5Q37AP7P.js +0 -1
- package/dist/chunk-5SZUSNGZ.js +0 -1
- package/dist/chunk-7CHFAMS2.js +0 -1
- package/dist/chunk-7MMJZ6HS.js +0 -1
- package/dist/chunk-7TC6DE3J.cjs +0 -1
- package/dist/chunk-7VX33E3V.js +0 -1
- package/dist/chunk-7YWAQOA4.cjs +0 -1
- package/dist/chunk-BEZPD44N.cjs +0 -1
- package/dist/chunk-BI263OHW.js +0 -1
- package/dist/chunk-CII6WWLO.cjs +0 -1
- package/dist/chunk-D5TYPCWU.cjs +0 -1
- package/dist/chunk-EEQY5QUG.js +0 -1
- package/dist/chunk-ELDDNERR.js +0 -1
- package/dist/chunk-ESJYBIYH.js +0 -1
- package/dist/chunk-EWYPSKKM.js +0 -1
- package/dist/chunk-EXCOQLWX.cjs +0 -1
- package/dist/chunk-FIEZKTAZ.cjs +0 -1
- package/dist/chunk-FWQVTMYA.cjs +0 -1
- package/dist/chunk-G4EWCRKS.js +0 -1
- package/dist/chunk-G7R5XZRM.cjs +0 -1
- package/dist/chunk-GGEV7LXX.cjs +0 -1
- package/dist/chunk-HJOZOENU.cjs +0 -1
- package/dist/chunk-IRDZVLNZ.cjs +0 -1
- package/dist/chunk-IW73G523.cjs +0 -1
- package/dist/chunk-IY5OZAB3.cjs +0 -1
- package/dist/chunk-J4NCYYGS.js +0 -1
- package/dist/chunk-J7JAZAJD.js +0 -1
- package/dist/chunk-JYNSO7ZY.js +0 -1
- package/dist/chunk-K3UVKYEU.js +0 -1
- package/dist/chunk-LQ76EDZG.js +0 -1
- package/dist/chunk-MROH35V3.cjs +0 -1
- package/dist/chunk-NJSAV73S.js +0 -1
- package/dist/chunk-NNM7QCNB.js +0 -1
- package/dist/chunk-NR44SNYE.js +0 -1
- package/dist/chunk-NXMTWY77.js +0 -1
- package/dist/chunk-OZCQZO2V.cjs +0 -4
- package/dist/chunk-PUQXRLZH.cjs +0 -1
- package/dist/chunk-Q3NTKN5I.cjs +0 -1
- package/dist/chunk-QDNSC57Z.js +0 -4
- package/dist/chunk-QGXTL5ZH.js +0 -2
- package/dist/chunk-QSQDP7L2.cjs +0 -1
- package/dist/chunk-RV2VULM7.cjs +0 -1
- package/dist/chunk-S5M33A4O.js +0 -1
- package/dist/chunk-SGTHOQQ2.js +0 -1
- package/dist/chunk-SL3RQOWA.js +0 -1
- package/dist/chunk-SW6HYEW7.cjs +0 -1
- package/dist/chunk-SYJC7UAW.js +0 -1
- package/dist/chunk-SZPWZZYG.cjs +0 -1
- package/dist/chunk-UA4B7JBO.cjs +0 -1
- package/dist/chunk-UQDJF5RR.cjs +0 -1
- package/dist/chunk-UTQUYABU.cjs +0 -1
- package/dist/chunk-VPW3DRV5.js +0 -1
- package/dist/chunk-W32WALNU.js +0 -1
- package/dist/chunk-XGZ6K753.cjs +0 -1
- package/dist/chunk-YFTR64N5.cjs +0 -1
- package/dist/chunk-ZFDS7W6B.cjs +0 -1
- package/dist/chunk-ZQOLZE6Z.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/stylings/index.cjs +0 -1
- package/dist/stylings/index.d.ts +0 -41
- package/dist/stylings/index.js +0 -1
package/dist/next/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
- Invalid 'route' value.
|
|
3
|
-
- Must be of type \`string\` and non-empty string, but received: "${E(e)}": \`${c(e)}\`.`);if(!/[\\[\]]/.test(e))return e;if(j(t,{message:({validType:o})=>`\u274C 'generateRoute' Failed cause in route "${e}":
|
|
4
|
-
- Missing or invalid parameters \`${o}\` for route: "${e}", must be of type \`${o}\` mapping parameters.`}),c$1(t))throw new TypeError(`\u274C 'generateRoute' Failed cause in route "${e}":
|
|
5
|
-
- Missing parameters \`plain-object\` for route: "${e}".`);let n=["?","&","#","=","/","'",'"',"(",")","+",";","%","@",":"],r$1=[],s=Array.from(e.matchAll(/\[(\w+)\]/g)).map(o=>o[1]);for(let o of s){let i=t[o];if(!g(i)){r$1.push(`- Invalid parameter: "${o}" must be of type \`string\`, but received: \`${E(i)}\`.`);continue}if(a(i)){r$1.push(`- Parameter "${o}" cannot be empty string.`);continue}let p=n.filter(g=>i.includes(g));if(/\s/.test(i)&&p.push("white-space(s)"),p.length>0){let g=p.map(a=>a==="`"?"backtick - (`)":`\`${a}\``);n.includes("white-space(s)")||n.push("white-space(s)");let m=n.map(a=>a==="`"?"backtick - (`)":`\`${a}\``);r$1.push(`- Parameter "${o}" contains invalid characters (${g.join(", ")}). These characters are not allowed because they could cause issues in URL structure. The following characters are forbidden in route parameters: (${m.join(", ")}).`);}}if(r(r$1))throw new Error(`\u274C 'generateRoute' Failed cause in route "${e}":
|
|
6
|
-
${r$1.join(`
|
|
7
|
-
`)}.`);return e.replace(/\[(\w+)\]/g,(o,i)=>(p(t[i])?t[i]:"").trim().replace(/^\/+|\/+$/g,"")).replace(/\/+/g,"/")}var q=(e,t={})=>{try{let p=function(m,a){return `${m.replace(/\/+$/,"")}/${a.replace(/^\/+/,"")}`};var n=p;a$1(c$1(e)?"":e,{message({currentType:m,validType:a}){return `First parameter (\`pathname\`) must be of type \`${a}\`, but received: \`${m}\`.`}}),f(t)||(t={});let{prefix:r="/api",withOrigin:s=!0}=t;if(!m(r)&&!g(r))throw new TypeError(`Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${E(r)}\`.`);G(s,{message:({currentType:m,validType:a})=>`Parameter \`withOrigin\` property of the \`options\` (second parameter) must be of type \`${a}\`, but received: \`${m}\`.`}),e=c$2(e),r=c$2(r);let o=r.endsWith("/")?r:r+"/";(e===r||e===r+"/"||e.startsWith(o))&&(e=e.slice(r.length),e=c$2(e));let i=b({suffix:r});return p(s?i:new URL(i).pathname,e).replace(/\/+$/,"")}catch(r){throw C(r)?r:new Error("Failed to generate backend API URL in `createBeApiUrl()`, Error: "+new Error(String(r)).message.trim())}};var b=({suffix:e="/"}={})=>{a$1(e,{message({currentType:t,validType:n}){return `Parameter \`suffix\` property of the first parameter must be of type \`${n}\`, but received: \`${t}\`.`}});try{let t=process.env.NEXT_PUBLIC_BACKEND_API_URL?.trim();if(t){t=c$3(t);let s=new URL(t);!!!s.port&&process.env.NEXT_PUBLIC_PORT_BE&&(t=s.origin+d(process.env.NEXT_PUBLIC_PORT_BE,{prefixColon:!0}));}else t="http://localhost"+d(process.env.NEXT_PUBLIC_PORT_BE||"8000",{prefixColon:!0});e=c$3(e).length?c$3(e):"/";let n=new URL(t.replace(/\/+$/,"")).origin,r=e==="/"?"/":`${e.startsWith("/")?"":"/"}${e.replace(/\/+$/,"")}`;return `${n}${r}`}catch(t){throw new Error("Invalid `NEXT_PUBLIC_BACKEND_API_URL`, failed to generate from `getBeApiUrl()`, Error:"+t)}};var te=()=>{try{let e=process.env.NEXT_PUBLIC_BASE_URL?.trim(),t=process.env.NEXT_PUBLIC_PORT_FE?.trim(),n=e||"http://localhost";n=c$3(n).replace(/\/+$/,"");let r=/:\/\/[^/]+:\d+/.test(n);!r&&t?n+=d(t,{prefixColon:!0}):!r&&!e&&(n+=":3000");let s=new URL(n);return `${s.protocol}//${s.hostname}${s.port?`:${s.port}`:""}`}catch(e){throw new Error("Invalid `NEXT_PUBLIC_BASE_URL`, failed to generate from `getBaseUrl()`, Error:"+e)}};
|
|
8
|
-
export{q as createBeApiUrl,N as generateRoute,te as getBaseUrl,b as getBeApiUrl};
|
|
1
|
+
import{normalizePathname as e,formatEnvPort as r}from"../chunk-SAW7XS4K.js";import{removeSpaces as t}from"../chunk-Q6NHYWVX.js";import{isEmptyString as o}from"../chunk-TSLYDPBJ.js";import{assertIsString as n}from"../chunk-W2W3L2M5.js";import"../chunk-WVSPXFTY.js";import{safeStableStringify as i}from"../chunk-L73TOPX5.js";import"../chunk-QNKGP5DY.js";import{isString as a,getPreciseType as s,assertIsPlainObject as p,isNil as c,isNonEmptyArray as u,isNonEmptyString as l,isPlainObject as m,isUndefined as f,assertIsBoolean as h,isError as $}from"../chunk-2UIRWYE3.js";function d(e,r){if(!a(e)||o(e))throw new TypeError(`❌ 'generateRoute' Failed:\n- Invalid 'route' value.\n- Must be of type \`string\` and non-empty string, but received: "${s(e)}": \`${i(e)}\`.`);if(!/[\\[\]]/.test(e))return e;if(p(r,{message:({validType:r})=>`❌ 'generateRoute' Failed cause in route "${e}":\n- Missing or invalid parameters \`${r}\` for route: "${e}", must be of type \`${r}\` mapping parameters.`}),c(r))throw new TypeError(`❌ 'generateRoute' Failed cause in route "${e}":\n- Missing parameters \`plain-object\` for route: "${e}".`);const t=["?","&","#","=","/","'",'"',"(",")","+",";","%","@",":"],n=[],m=Array.from(e.matchAll(/\[(\w+)\]/g)).map(e=>e[1]);for(const e of m){const i=r[e];if(!a(i)){n.push(`- Invalid parameter: "${e}" must be of type \`string\`, but received: \`${s(i)}\`.`);continue}if(o(i)){n.push(`- Parameter "${e}" cannot be empty string.`);continue}const p=t.filter(e=>i.includes(e));if(/\s/.test(i)&&p.push("white-space(s)"),p.length>0){const r=p.map(e=>"`"===e?"backtick - (`)":`\`${e}\``);t.includes("white-space(s)")||t.push("white-space(s)");const o=t.map(e=>"`"===e?"backtick - (`)":`\`${e}\``);n.push(`- Parameter "${e}" contains invalid characters (${r.join(", ")}). These characters are not allowed because they could cause issues in URL structure. The following characters are forbidden in route parameters: (${o.join(", ")}).`)}}if(u(n))throw new Error(`❌ 'generateRoute' Failed cause in route "${e}":\n${n.join("\n")}.`);return e.replace(/\[(\w+)\]/g,(e,t)=>(l(r[t])?r[t]:"").trim().replace(/^\/+|\/+$/g,"")).replace(/\/+/g,"/")}var g=(r,t={})=>{try{let o=function(e,r){return`${e.replace(/\/+$/,"")}/${r.replace(/^\/+/,"")}`};n(c(r)?"":r,{message:({currentType:e,validType:r})=>`First parameter (\`pathname\`) must be of type \`${r}\`, but received: \`${e}\`.`}),m(t)||(t={});let{prefix:i="/api",withOrigin:p=!0}=t;if(!f(i)&&!a(i))throw new TypeError(`Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${s(i)}\`.`);h(p,{message:({currentType:e,validType:r})=>`Parameter \`withOrigin\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),r=e(r),i=e(i);const u=i.endsWith("/")?i:i+"/";(r===i||r===i+"/"||r.startsWith(u))&&(r=r.slice(i.length),r=e(r));const l=v({suffix:i});return o(p?l:new URL(l).pathname,r).replace(/\/+$/,"")}catch(e){throw $(e)?e:new Error("Failed to generate backend API URL in `createBeApiUrl()`, Error: "+new Error(String(e)).message.trim())}},v=({suffix:e="/"}={})=>{var o;n(e,{message:({currentType:e,validType:r})=>`Parameter \`suffix\` property of the first parameter must be of type \`${r}\`, but received: \`${e}\`.`});try{let n=null==(o=process.env.NEXT_PUBLIC_BACKEND_API_URL)?void 0:o.trim();if(n){n=t(n);const e=new URL(n);!!!e.port&&process.env.NEXT_PUBLIC_PORT_BE&&(n=e.origin+r(process.env.NEXT_PUBLIC_PORT_BE,{prefixColon:!0}))}else n="http://localhost"+r(process.env.NEXT_PUBLIC_PORT_BE||"8000",{prefixColon:!0});e=t(e).length?t(e):"/";const i=new URL(n.replace(/\/+$/,"")).origin;return`${i}${"/"===e?"/":`${e.startsWith("/")?"":"/"}${e.replace(/\/+$/,"")}`}`}catch(e){throw new Error("Invalid `NEXT_PUBLIC_BACKEND_API_URL`, failed to generate from `getBeApiUrl()`, Error:"+e)}},w=()=>{var e,o;try{const n=null==(e=process.env.NEXT_PUBLIC_BASE_URL)?void 0:e.trim(),i=null==(o=process.env.NEXT_PUBLIC_PORT_FE)?void 0:o.trim();let a=n||"http://localhost";a=t(a).replace(/\/+$/,"");const s=/:\/\/[^/]+:\d+/.test(a);!s&&i?a+=r(i,{prefixColon:!0}):s||n||(a+=":3000");const p=new URL(a);return`${p.protocol}//${p.hostname}${p.port?`:${p.port}`:""}`}catch(e){throw new Error("Invalid `NEXT_PUBLIC_BASE_URL`, failed to generate from `getBaseUrl()`, Error:"+e)}};export{g as createBeApiUrl,d as generateRoute,w as getBaseUrl,v as getBeApiUrl};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
exports.getClientIpOrUrl=g;
|
|
1
|
+
"use strict";var e=require("../../chunk-INUFZJLX.cjs");require("server-only");var r=require("next/server");exports.getClientIpOrUrl=(t,n=!0)=>{if(!e.isFunction(r.NextRequest))throw new Error("Function `getClientIpOrUrl` is designed to be used in a `NextJS` environment.");if(!(t instanceof r.NextRequest))throw new TypeError("First parameter (`request`) must be an `instance of NextRequest` from `NextJS`.");e.assertIsBoolean(n,{message:({currentType:e,validType:r})=>`Second parameter (\`includeFullUrl\`) must be of type \`${r}\`, but received: \`${e}\`.`});const s=(t.headers.get("x-forwarded-for")??"127.0.0.1").trim().split(",");"::ffff:127.0.0.1"!==s[0]&&"::1"!==s[0]||(s[0]="127.0.0.1");const o=s.length>1?s[s.length-1].trim():s[0];if(!n)return o;const i=t.headers.get("x-forwarded-proto")||"http",u=t.headers.get("x-forwarded-port")||"3000";return`${"production"===process.env.NODE_ENV?i:"http"}://${o}:${u}`};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export{g as getClientIpOrUrl};
|
|
1
|
+
import{isFunction as e,assertIsBoolean as r}from"../../chunk-2UIRWYE3.js";import"server-only";import{NextRequest as t}from"next/server";var o=(o,n=!0)=>{if(!e(t))throw new Error("Function `getClientIpOrUrl` is designed to be used in a `NextJS` environment.");if(!(o instanceof t))throw new TypeError("First parameter (`request`) must be an `instance of NextRequest` from `NextJS`.");r(n,{message:({currentType:e,validType:r})=>`Second parameter (\`includeFullUrl\`) must be of type \`${r}\`, but received: \`${e}\`.`});const s=(o.headers.get("x-forwarded-for")??"127.0.0.1").trim().split(",");"::ffff:127.0.0.1"!==s[0]&&"::1"!==s[0]||(s[0]="127.0.0.1");const i=s.length>1?s[s.length-1].trim():s[0];if(!n)return i;const p=o.headers.get("x-forwarded-proto")||"http",a=o.headers.get("x-forwarded-port")||"3000";return`${"production"===process.env.NODE_ENV?p:"http"}://${i}:${a}`};export{o as getClientIpOrUrl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var e=require("../chunk-XVHPXRUH.cjs");require("../chunk-ZR7GTJQX.cjs"),require("../chunk-4VCRMMAH.cjs"),require("../chunk-YT3MSZKK.cjs"),require("../chunk-5C2SMIGX.cjs"),require("../chunk-DQFU3KLE.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"findDuplicates",{enumerable:!0,get:function(){return e.findDuplicates}}),Object.defineProperty(exports,"omitKeys",{enumerable:!0,get:function(){return e.omitKeys}}),Object.defineProperty(exports,"omitKeysDeep",{enumerable:!0,get:function(){return e.omitKeysDeep}});
|
package/dist/operations/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{findDuplicates,omitKeys,omitKeysDeep}from"../chunk-QVRTHAM2.js";import"../chunk-G2B35D5W.js";import"../chunk-GRSCNTOK.js";import"../chunk-ZXIWDFEQ.js";import"../chunk-FIAAX3UE.js";import"../chunk-L73TOPX5.js";import"../chunk-QNKGP5DY.js";import"../chunk-2UIRWYE3.js";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{E as Extends,I as IfExtends}from'./extends-Bk_SBGdT.js';
|
|
2
|
+
/** -------------------------------------------------------
|
|
3
|
+
* * ***And.***
|
|
4
|
+
* -------------------------------------------------------
|
|
5
|
+
* Performs a **logical AND** operation between two boolean types.
|
|
6
|
+
* - Returns `true` if **both** conditions extend `true`.
|
|
7
|
+
* - Returns `false` otherwise.
|
|
8
|
+
*
|
|
9
|
+
* @template Condition1 - The first condition.
|
|
10
|
+
* @template Condition2 - The second condition.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* type Case1 = And<true, true>;
|
|
14
|
+
* // ➔ true
|
|
15
|
+
* type Case2 = And<false, true>;
|
|
16
|
+
* // ➔ false
|
|
17
|
+
* type Case3 = And<true, false>;
|
|
18
|
+
* // ➔ false
|
|
19
|
+
* type Case4 = And<false, false>;
|
|
20
|
+
* // ➔ false
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
type And<Condition1,Condition2>=IfExtends<Condition1,true,Extends<Condition2,true>>;
|
|
24
|
+
/** -------------------------------------------------------
|
|
25
|
+
* * ***AndArr.***
|
|
26
|
+
* -------------------------------------------------------
|
|
27
|
+
* Performs a **logical AND** operation across all elements in an array of boolean types.
|
|
28
|
+
* - Returns `true` if **all elements** extend `true`.
|
|
29
|
+
* - Returns `false` if **any element** is not `true`.
|
|
30
|
+
*
|
|
31
|
+
* @template Conditions - A readonly array of boolean conditions.
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* type Case1 = AndArr<[true, true, true]>;
|
|
35
|
+
* // ➔ true
|
|
36
|
+
* type Case2 = AndArr<[true, true, false]>;
|
|
37
|
+
* // ➔ false
|
|
38
|
+
* type Case3 = AndArr<[false, false, false]>;
|
|
39
|
+
* // ➔ false
|
|
40
|
+
* type Case4 = AndArr<[]>;
|
|
41
|
+
* // ➔ true (vacuous truth)
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
type AndArr<Conditions extends readonly unknown[]>=Extends<Conditions[number],true>;
|
|
45
|
+
/** -------------------------------------------------------
|
|
46
|
+
* * ***Or.***
|
|
47
|
+
* -------------------------------------------------------
|
|
48
|
+
*
|
|
49
|
+
* Computes the logical OR of two type-level boolean conditions.
|
|
50
|
+
*
|
|
51
|
+
* @template Condition1 - First boolean condition.
|
|
52
|
+
* @template Condition2 - Second boolean condition.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* type Case1 = Or<true, true>; // true
|
|
57
|
+
* type Case2 = Or<false, true>; // true
|
|
58
|
+
* type Case3 = Or<false, false>; // false
|
|
59
|
+
* type Case4 = Or<true, false>; // true
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* - Uses {@link IfExtends} to determine if either condition is `true`.
|
|
64
|
+
* - Returns `true` if at least one of the two conditions is `true`.
|
|
65
|
+
* - Returns `false` only if both are `false`.
|
|
66
|
+
*/
|
|
67
|
+
type Or<Condition1,Condition2>=IfExtends<Condition1,true,true,IfExtends<Condition2,true>>;
|
|
68
|
+
/** -------------------------------------------------------
|
|
69
|
+
* * ***OrArr.***
|
|
70
|
+
* -------------------------------------------------------
|
|
71
|
+
*
|
|
72
|
+
* Computes the logical OR of all elements inside a tuple or array of boolean types.
|
|
73
|
+
*
|
|
74
|
+
* @template Conditions - An array of boolean type elements.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* type Case1 = OrArr<[true, true, true]>; // true
|
|
79
|
+
* type Case2 = OrArr<[true, true, false]>; // true
|
|
80
|
+
* type Case3 = OrArr<[false, false, false]>; // false
|
|
81
|
+
* type Case4 = OrArr<[]>; // false
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* - Uses TypeScript's indexed access types and conditional type inference.
|
|
86
|
+
* - Returns `true` if at least one element in the array is `true`.
|
|
87
|
+
* - Returns `false` if all elements are `false` or array is empty.
|
|
88
|
+
*/
|
|
89
|
+
type OrArr<Conditions extends readonly unknown[]>=true extends Conditions[number]?true:false;export type{And as A,OrArr as O,AndArr as a,Or as b};
|
package/dist/parsers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var e=require("../chunk-26XIKDJI.cjs");require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"extractFileName",{enumerable:!0,get:function(){return e.extractFileName}});
|
package/dist/parsers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{extractFileName}from"../chunk-7KJBDGEP.js";import"../chunk-2UIRWYE3.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var e=require("../chunk-I6NOFGAK.cjs"),r=require("../chunk-KHO2SBNA.cjs"),t=require("../chunk-7YVINA3U.cjs"),n=require("../chunk-EXWCTDC3.cjs"),i=require("../chunk-4VCRMMAH.cjs");require("../chunk-7BXIZM57.cjs");var u=require("../chunk-YZR5OGJA.cjs"),o=require("../chunk-EBMHQW7X.cjs");require("../chunk-Y4O5KZF6.cjs");var s=require("../chunk-DVMHRLKP.cjs"),c=require("../chunk-DQFU3KLE.cjs"),p=require("../chunk-UDA26MCU.cjs"),b=require("../chunk-INUFZJLX.cjs");Object.defineProperty(exports,"areArraysEqual",{enumerable:!0,get:function(){return e.areArraysEqual}}),Object.defineProperty(exports,"areObjectsEqual",{enumerable:!0,get:function(){return e.areObjectsEqual}}),Object.defineProperty(exports,"areURLsEqualPath",{enumerable:!0,get:function(){return e.areURLsEqualPath}}),Object.defineProperty(exports,"areURLsIdentical",{enumerable:!0,get:function(){return e.areURLsIdentical}}),Object.defineProperty(exports,"arrayHasAnyMatch",{enumerable:!0,get:function(){return e.arrayHasAnyMatch}}),Object.defineProperty(exports,"doesKeyExist",{enumerable:!0,get:function(){return e.doesKeyExist}}),Object.defineProperty(exports,"isArguments",{enumerable:!0,get:function(){return e.isArguments}}),Object.defineProperty(exports,"isArrayLike",{enumerable:!0,get:function(){return e.isArrayLike}}),Object.defineProperty(exports,"isArrayLikeObject",{enumerable:!0,get:function(){return e.isArrayLikeObject}}),Object.defineProperty(exports,"isCurrencyLike",{enumerable:!0,get:function(){return e.isCurrencyLike}}),Object.defineProperty(exports,"isDeepEqual",{enumerable:!0,get:function(){return e.isDeepEqual}}),Object.defineProperty(exports,"isElement",{enumerable:!0,get:function(){return e.isElement}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}}),Object.defineProperty(exports,"isEmptyDeep",{enumerable:!0,get:function(){return e.isEmptyDeep}}),Object.defineProperty(exports,"isEqualWith",{enumerable:!0,get:function(){return e.isEqualWith}}),Object.defineProperty(exports,"isLength",{enumerable:!0,get:function(){return e.isLength}}),Object.defineProperty(exports,"isMatch",{enumerable:!0,get:function(){return e.isMatch}}),Object.defineProperty(exports,"isMatchWith",{enumerable:!0,get:function(){return e.isMatchWith}}),Object.defineProperty(exports,"isNative",{enumerable:!0,get:function(){return e.isNative}}),Object.defineProperty(exports,"isObjectLoose",{enumerable:!0,get:function(){return e.isObjectLoose}}),Object.defineProperty(exports,"isPropertyKey",{enumerable:!0,get:function(){return e.isPropertyKey}}),Object.defineProperty(exports,"isSafeInteger",{enumerable:!0,get:function(){return e.isSafeInteger}}),Object.defineProperty(exports,"isValidURL",{enumerable:!0,get:function(){return e.isValidURL}}),Object.defineProperty(exports,"isWeakMap",{enumerable:!0,get:function(){return e.isWeakMap}}),Object.defineProperty(exports,"textContainsAll",{enumerable:!0,get:function(){return e.textContainsAll}}),Object.defineProperty(exports,"textContainsAny",{enumerable:!0,get:function(){return e.textContainsAny}}),Object.defineProperty(exports,"isURL",{enumerable:!0,get:function(){return r.isURL}}),Object.defineProperty(exports,"isNonEmptyValue",{enumerable:!0,get:function(){return t.isNonEmptyValue}}),Object.defineProperty(exports,"isTypedArray",{enumerable:!0,get:function(){return t.isTypedArray}}),Object.defineProperty(exports,"isEmptyValue",{enumerable:!0,get:function(){return n.isEmptyValue}}),Object.defineProperty(exports,"isArrayBuffer",{enumerable:!0,get:function(){return i.isArrayBuffer}}),Object.defineProperty(exports,"isEmptyArray",{enumerable:!0,get:function(){return i.isEmptyArray}}),Object.defineProperty(exports,"isEmptyObject",{enumerable:!0,get:function(){return i.isEmptyObject}}),Object.defineProperty(exports,"isEqual",{enumerable:!0,get:function(){return i.isEqual}}),Object.defineProperty(exports,"isRegExp",{enumerable:!0,get:function(){return i.isRegExp}}),Object.defineProperty(exports,"isFinite",{enumerable:!0,get:function(){return u.isFinite}}),Object.defineProperty(exports,"isEmptyString",{enumerable:!0,get:function(){return o.isEmptyString}}),Object.defineProperty(exports,"isInteger",{enumerable:!0,get:function(){return s.isInteger}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return c.isDate}}),Object.defineProperty(exports,"isMap",{enumerable:!0,get:function(){return c.isMap}}),Object.defineProperty(exports,"isBigInt",{enumerable:!0,get:function(){return p.isBigInt}}),Object.defineProperty(exports,"getPreciseType",{enumerable:!0,get:function(){return b.getPreciseType}}),Object.defineProperty(exports,"hasOwnProp",{enumerable:!0,get:function(){return b.hasOwnProp}}),Object.defineProperty(exports,"isArray",{enumerable:!0,get:function(){return b.isArray}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return b.isBoolean}}),Object.defineProperty(exports,"isBooleanObject",{enumerable:!0,get:function(){return b.isBooleanObject}}),Object.defineProperty(exports,"isBuffer",{enumerable:!0,get:function(){return b.isBuffer}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return b.isError}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return b.isFunction}}),Object.defineProperty(exports,"isInfinityNumber",{enumerable:!0,get:function(){return b.isInfinityNumber}}),Object.defineProperty(exports,"isNaN",{enumerable:!0,get:function(){return b.isNaN}}),Object.defineProperty(exports,"isNil",{enumerable:!0,get:function(){return b.isNil}}),Object.defineProperty(exports,"isNonEmptyArray",{enumerable:!0,get:function(){return b.isNonEmptyArray}}),Object.defineProperty(exports,"isNonEmptyString",{enumerable:!0,get:function(){return b.isNonEmptyString}}),Object.defineProperty(exports,"isNull",{enumerable:!0,get:function(){return b.isNull}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return b.isNumber}}),Object.defineProperty(exports,"isNumberObject",{enumerable:!0,get:function(){return b.isNumberObject}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return b.isObject}}),Object.defineProperty(exports,"isObjectOrArray",{enumerable:!0,get:function(){return b.isObjectOrArray}}),Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return b.isPlainObject}}),Object.defineProperty(exports,"isSet",{enumerable:!0,get:function(){return b.isSet}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return b.isString}}),Object.defineProperty(exports,"isStringObject",{enumerable:!0,get:function(){return b.isStringObject}}),Object.defineProperty(exports,"isSymbol",{enumerable:!0,get:function(){return b.isSymbol}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return b.isUndefined}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as IsPositive,P as ParseNumber,I as IsStringLiteral,C as CharAt,c as IsUnknown,j as IsReadonlyArray,l as IsArray}from'../is-array-Cymwrsmm.js';import{A as AnyString,a as IsEmptyString,T as Trim}from'../string-XA-til3C.js';import{I as IsAny}from'../any-BmdI8UbK.js';import{A as AnyFunction,a as AnObjectNonArray,T as TypedArray}from'../type-data-DDs-u2kq.js';import{E as Extends}from'../extends-Bk_SBGdT.js';import{P as Prettify}from'../prettify-C4xLcYOP.js';import{N as NumberRangeUnion}from'../NumberRangeUnion-DC-C3_Kq.js';import{a as IsPlainObjectResult}from'../isPlainObject-BVhBAPHX.js';export{G as GetPreciseTypeOptions,I as IsNumberOptions,g as getPreciseType,i as isNumber,b as isPlainObject}from'../isPlainObject-BVhBAPHX.js';import{I as IsNever}from'../never-BfayMBF9.js';import{O as OrArr}from'../or-DyZCRvaU.js';import'../if-CvT4R7Kh.js';type EmptyObject<T>={[K in keyof T]?:never;};type EmptyObjectOf<T>=EmptyObject<T>extends T?EmptyObject<T>:never;type List<T>=ArrayLike<T>;type CustomizerIsEqualWith=(value:unknown,other:unknown,indexOrKey:PropertyKey,parent:unknown,otherParent:unknown,stack:unknown)=>boolean|undefined;type CustomizerIsMatchWith=(value:unknown,other:unknown,indexOrKey:PropertyKey,object:object,source:object)=>boolean|undefined;
|
|
2
2
|
/** ----------------------------------------------------------
|
|
3
3
|
* * ***Predicate: `areArraysEqual`.***
|
|
4
4
|
* ----------------------------------------------------------
|
|
@@ -641,6 +641,20 @@ declare const isBigInt:(value:unknown)=>value is bigint;
|
|
|
641
641
|
* isBoolean("true"); // ➔ false
|
|
642
642
|
*/
|
|
643
643
|
declare const isBoolean:(value:unknown)=>value is boolean;
|
|
644
|
+
/** ----------------------------------------------------
|
|
645
|
+
* * ***Type guard: `isBooleanObject`.***
|
|
646
|
+
* ----------------------------------------------------
|
|
647
|
+
* **Checks if a value is a **`Boolean` object wrapper**
|
|
648
|
+
* (`new Boolean(...)`), not a primitive boolean.**
|
|
649
|
+
* @param {*} value The value to check.
|
|
650
|
+
* @returns {value is Boolean} Returns `true` if `value` is a `Boolean` object.
|
|
651
|
+
* @example
|
|
652
|
+
* isBooleanObject(new Boolean(true));
|
|
653
|
+
* // ➔ true
|
|
654
|
+
* isBooleanObject(true);
|
|
655
|
+
* // ➔ false
|
|
656
|
+
*/
|
|
657
|
+
declare function isBooleanObject(value:unknown):value is Boolean;
|
|
644
658
|
/** ----------------------------------------------------
|
|
645
659
|
* * ***Type guard: `isBuffer`.***
|
|
646
660
|
* ----------------------------------------------------------
|
|
@@ -695,27 +709,45 @@ declare const isBuffer:(value:unknown)=>value is Buffer;
|
|
|
695
709
|
* isCurrencyLike("abc");
|
|
696
710
|
* // ➔ false
|
|
697
711
|
*/
|
|
698
|
-
declare const isCurrencyLike:(input:unknown)=>boolean;
|
|
712
|
+
declare const isCurrencyLike:(input:unknown)=>boolean;type isDateOptions={
|
|
713
|
+
/** * ***Skip the validity check (`!isNaN(date.getTime())`).***
|
|
714
|
+
*
|
|
715
|
+
* When `true`, the function only checks that the value is an
|
|
716
|
+
* instance of `Date` without verifying that it represents a valid
|
|
717
|
+
* date value.
|
|
718
|
+
*
|
|
719
|
+
* @default false
|
|
720
|
+
*/
|
|
721
|
+
skipInvalidDate?:boolean;};
|
|
699
722
|
/** ----------------------------------------------------------
|
|
700
723
|
* * ***Type guard: `isDate`.***
|
|
701
724
|
* ----------------------------------------------------------
|
|
702
725
|
* **Determines whether the given `value` is a real, valid JavaScript
|
|
703
726
|
* **[`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)** object.**
|
|
704
727
|
* - **Behavior:**
|
|
705
|
-
* -
|
|
706
|
-
*
|
|
707
|
-
*
|
|
728
|
+
* - Returns **true** only if:
|
|
729
|
+
* - `value` is an instance of `Date`.
|
|
730
|
+
* - and, unless `options.skipInvalidDate` is `true`,
|
|
731
|
+
* the underlying time value is valid (`!isNaN(value.getTime())`).
|
|
732
|
+
* - Returns **false** for:
|
|
733
|
+
* - non-Date values (strings, numbers, etc.).
|
|
734
|
+
* - `Date` instances that represent an invalid time value
|
|
735
|
+
* (e.g. `new Date("bad")`), unless skipping is enabled.
|
|
708
736
|
* @param {*} value - The value to check.
|
|
709
737
|
* @returns {boolean} Return `true` if value is a valid Date object.
|
|
710
738
|
* @example
|
|
711
739
|
* isDate(new Date());
|
|
712
|
-
* //
|
|
740
|
+
* // ➜ true
|
|
713
741
|
* isDate(new Date("invalid"));
|
|
714
|
-
* //
|
|
742
|
+
* // ➜ false
|
|
715
743
|
* isDate("2024-01-01");
|
|
716
|
-
* //
|
|
744
|
+
* // ➜ false
|
|
745
|
+
*
|
|
746
|
+
* // Skipping validity check:
|
|
747
|
+
* isDate(new Date("invalid"), { skipInvalidDate: true });
|
|
748
|
+
* // ➜ true
|
|
717
749
|
*/
|
|
718
|
-
declare const isDate:(value:unknown)=>value is Date;
|
|
750
|
+
declare const isDate:(value:unknown,options?:isDateOptions)=>value is Date;
|
|
719
751
|
/** ----------------------------------------------------------
|
|
720
752
|
* * ***Predicate: `isDeepEqual`.***
|
|
721
753
|
* ----------------------------------------------------------
|
|
@@ -842,7 +874,7 @@ declare function isEmpty<T extends{__trapAny:any;}>(value?:T):boolean;declare fu
|
|
|
842
874
|
* ----------------------------------------------------------
|
|
843
875
|
* **Checks whether a given value is an empty array.**
|
|
844
876
|
* - **Behavior:**
|
|
845
|
-
* - Non-array inputs are considered
|
|
877
|
+
* - Non-array inputs are considered ***`empty`*** ***(defensive strategy)***.
|
|
846
878
|
* @param {*} [value] - The value to check.
|
|
847
879
|
* @returns {boolean} Returns `true` if it's ***not an array*** or ***an empty-array***.
|
|
848
880
|
* @example
|
|
@@ -895,7 +927,7 @@ declare const isEmptyArray:(value:unknown)=>boolean;
|
|
|
895
927
|
* // ➔ true
|
|
896
928
|
*/
|
|
897
929
|
declare const isEmptyDeep:(value:unknown)=>boolean;type IsEmptyObjectOptions={
|
|
898
|
-
/** Whether to check for symbol properties in addition to string keys, defaultValue: `
|
|
930
|
+
/** Whether to check for symbol properties in addition to string keys, defaultValue: `false`.
|
|
899
931
|
*
|
|
900
932
|
* @default false
|
|
901
933
|
*/
|
|
@@ -1143,7 +1175,7 @@ declare const isError:(error:unknown)=>error is Error;
|
|
|
1143
1175
|
* @param {*} value - The value to check.
|
|
1144
1176
|
* @returns {boolean} Returns `true` if `value` is a finite primitive number, else `false`.
|
|
1145
1177
|
* @example
|
|
1146
|
-
* import * as RzlUtilsJs from "@rzl-zone/utils-js";
|
|
1178
|
+
* import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
|
|
1147
1179
|
*
|
|
1148
1180
|
* // Strict finite number check (only primitive numbers)
|
|
1149
1181
|
* RzlUtilsJs.isFinite(3);
|
|
@@ -1187,6 +1219,39 @@ declare function isFinite(value:unknown):value is number;
|
|
|
1187
1219
|
* // ➔ false
|
|
1188
1220
|
*/
|
|
1189
1221
|
declare const isFunction:(value:unknown)=>value is AnyFunction;
|
|
1222
|
+
/** ----------------------------------------------------
|
|
1223
|
+
* * ***Type guard: `isInfinityNumber`.***
|
|
1224
|
+
* ----------------------------------------------------
|
|
1225
|
+
* **Checks if a value is positive or negative
|
|
1226
|
+
* [`Infinity`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity).**
|
|
1227
|
+
*
|
|
1228
|
+
* - **ℹ️ Note:**
|
|
1229
|
+
* - This is stricter than the global `isFinite`,
|
|
1230
|
+
* because it only returns `true` for `Infinity` or `-Infinity`,
|
|
1231
|
+
* not other non-finite values.
|
|
1232
|
+
*
|
|
1233
|
+
* @param {*} value The value to check.
|
|
1234
|
+
* @returns {boolean} Returns `true` if `value` is `Infinity` or `-Infinity`, else `false`.
|
|
1235
|
+
*
|
|
1236
|
+
* @example
|
|
1237
|
+
* import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
|
|
1238
|
+
*
|
|
1239
|
+
* RzlUtilsJs.isInfinityNumber(Infinity);
|
|
1240
|
+
* // ➔ true
|
|
1241
|
+
*
|
|
1242
|
+
* RzlUtilsJs.isInfinityNumber(-Infinity);
|
|
1243
|
+
* // ➔ true
|
|
1244
|
+
*
|
|
1245
|
+
* RzlUtilsJs.isInfinityNumber(new Number(Infinity));
|
|
1246
|
+
* // ➔ true
|
|
1247
|
+
*
|
|
1248
|
+
* RzlUtilsJs.isInfinityNumber(NaN);
|
|
1249
|
+
* // ➔ false
|
|
1250
|
+
*
|
|
1251
|
+
* RzlUtilsJs.isInfinityNumber(123);
|
|
1252
|
+
* // ➔ false
|
|
1253
|
+
*/
|
|
1254
|
+
declare function isInfinityNumber(value:unknown):boolean;
|
|
1190
1255
|
/** ---------------------------------------------------------
|
|
1191
1256
|
* * ***Type guard: `isInteger`.***
|
|
1192
1257
|
* ----------------------------------------------------------
|
|
@@ -1345,7 +1410,7 @@ declare function isMatchWith(value:object,other:object,customizer?:CustomizerIsM
|
|
|
1345
1410
|
* @param {*} value The value to check.
|
|
1346
1411
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
1347
1412
|
* @example
|
|
1348
|
-
* import * as RzlUtilsJs from "@rzl-zone/utils-js";
|
|
1413
|
+
* import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
|
|
1349
1414
|
*
|
|
1350
1415
|
* RzlUtilsJs.isNaN(NaN);
|
|
1351
1416
|
* // ➔ true
|
|
@@ -1376,7 +1441,7 @@ declare function isNaN(value:unknown):boolean;
|
|
|
1376
1441
|
* isNative(Array.prototype.push);
|
|
1377
1442
|
* // ➔ true
|
|
1378
1443
|
*
|
|
1379
|
-
* import * as RzlUtilsJs from "@rzl-zone/utils-js";
|
|
1444
|
+
* import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
|
|
1380
1445
|
* isNative(RzlUtilsJs);
|
|
1381
1446
|
* // ➔ false
|
|
1382
1447
|
*/
|
|
@@ -1539,7 +1604,21 @@ declare const isNonEmptyValue:(value:unknown,options?:IsNonEmptyValueOptions)=>b
|
|
|
1539
1604
|
* isNull(0); // ➔ false
|
|
1540
1605
|
* isNull(undefined); // ➔ false
|
|
1541
1606
|
*/
|
|
1542
|
-
declare const isNull:(val:unknown)=>val is null;
|
|
1607
|
+
declare const isNull:(val:unknown)=>val is null;
|
|
1608
|
+
/** ----------------------------------------------------
|
|
1609
|
+
* * ***Type guard: `isNumberObject`.***
|
|
1610
|
+
* ----------------------------------------------------
|
|
1611
|
+
* **Checks if a value is a **`Number` object wrapper**
|
|
1612
|
+
* (`new Number(...)`), not a primitive number.**
|
|
1613
|
+
* @param {*} value The value to check.
|
|
1614
|
+
* @returns {boolean} Returns `true` if `value` is a `Number` object.
|
|
1615
|
+
* @example
|
|
1616
|
+
* isNumberObject(new Number(42));
|
|
1617
|
+
* // ➔ true
|
|
1618
|
+
* isNumberObject(42);
|
|
1619
|
+
* // ➔ false
|
|
1620
|
+
*/
|
|
1621
|
+
declare function isNumberObject(value:unknown):value is Number;type HasKeys$1<T>=keyof T extends never?false:true;type IsObject<T>=unknown extends T?T & Record<PropertyKey,unknown>:T extends object?T extends AnObjectNonArray?T:HasKeys$1<T>extends false?T & Record<PropertyKey,unknown>:IsArray<T>extends true?Exclude<T,unknown[]>:T:never;
|
|
1543
1622
|
/** ---------------------------------------------------------
|
|
1544
1623
|
* * ***Type guard: `isObject`.***
|
|
1545
1624
|
* ----------------------------------------------------------
|
|
@@ -1560,7 +1639,8 @@ declare const isNull:(val:unknown)=>val is null;type HasKeys$1<T>=keyof T extend
|
|
|
1560
1639
|
* - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`
|
|
1561
1640
|
* - `undefined` (including `NaN`, which is a primitive number)
|
|
1562
1641
|
* - **ℹ️ Note:**
|
|
1563
|
-
* - If you specifically need to check for ***plain-objects
|
|
1642
|
+
* - If you specifically need to check for ***plain-objects*** only, use **{@link isPlainObject}** instead.
|
|
1643
|
+
* - If you specifically need to check for ***object***, ***plain-objects***, and include ***array***, use **{@link isObjectOrArray}** instead.
|
|
1564
1644
|
* @template T - The type of the value being checked.
|
|
1565
1645
|
* @param {*} value - The value to check.
|
|
1566
1646
|
* @returns {boolean} Returns `true` if the value is a ***plain-objects***, otherwise `false`.
|
|
@@ -1751,6 +1831,20 @@ declare function isSet<T=unknown>(value:Set<T>):value is Set<T>;declare function
|
|
|
1751
1831
|
* }
|
|
1752
1832
|
*/
|
|
1753
1833
|
declare const isString:(value:unknown)=>value is string;
|
|
1834
|
+
/** ----------------------------------------------------
|
|
1835
|
+
* * ***Type guard: `isStringObject`.***
|
|
1836
|
+
* ----------------------------------------------------
|
|
1837
|
+
* **Checks if a value is a **`String` object wrapper**
|
|
1838
|
+
* (`new String(...)`), not a primitive string.**
|
|
1839
|
+
* @param {*} value The value to check.
|
|
1840
|
+
* @returns {boolean} Returns `true` if `value` is a `String` object.
|
|
1841
|
+
* @example
|
|
1842
|
+
* isStringObject(new String("hello"));
|
|
1843
|
+
* // ➔ true
|
|
1844
|
+
* isStringObject("hello");
|
|
1845
|
+
* // ➔ false
|
|
1846
|
+
*/
|
|
1847
|
+
declare function isStringObject(value:unknown):value is String;
|
|
1754
1848
|
/** ----------------------------------------------------------
|
|
1755
1849
|
* * ***Type guard: `isSymbol`.***
|
|
1756
1850
|
* ----------------------------------------------------------
|
|
@@ -1862,4 +1956,4 @@ declare const isValidURL:(url:unknown)=>boolean;
|
|
|
1862
1956
|
* isWeakMap(new Map);
|
|
1863
1957
|
* // ➔ false
|
|
1864
1958
|
*/
|
|
1865
|
-
declare function isWeakMap<K extends object=object,V=unknown>(value:unknown):value is WeakMap<K,V>;export{type IsArrayResult,IsPlainObjectResult,areArraysEqual,areObjectsEqual,areURLsEqualPath,areURLsIdentical,arrayHasAnyMatch,doesKeyExist,hasOwnProp,isArguments,isArray,isArrayBuffer,isArrayLike,isArrayLikeObject,isBigInt,isBoolean,isBuffer,isCurrencyLike,isDate,isDeepEqual,isElement,isEmpty,isEmptyArray,isEmptyDeep,isEmptyObject,isEmptyString,isEmptyValue,isEqual,isEqualWith,isError,isFinite,isFunction,isInteger,isLength,isMap,isMatch,isMatchWith,isNaN,isNative,isNil,isNonEmptyArray,isNonEmptyString,isNonEmptyValue,isNull,isObject,isObjectLoose,isObjectOrArray,isPropertyKey,isRegExp,isSafeInteger,isSet,isString,isSymbol,isTypedArray,isURL,isUndefined,isValidURL,isWeakMap,textContainsAll,textContainsAny};
|
|
1959
|
+
declare function isWeakMap<K extends object=object,V=unknown>(value:unknown):value is WeakMap<K,V>;export{type IsArrayResult,IsPlainObjectResult,areArraysEqual,areObjectsEqual,areURLsEqualPath,areURLsIdentical,arrayHasAnyMatch,doesKeyExist,hasOwnProp,isArguments,isArray,isArrayBuffer,isArrayLike,isArrayLikeObject,isBigInt,isBoolean,isBooleanObject,isBuffer,isCurrencyLike,isDate,isDeepEqual,isElement,isEmpty,isEmptyArray,isEmptyDeep,isEmptyObject,isEmptyString,isEmptyValue,isEqual,isEqualWith,isError,isFinite,isFunction,isInfinityNumber,isInteger,isLength,isMap,isMatch,isMatchWith,isNaN,isNative,isNil,isNonEmptyArray,isNonEmptyString,isNonEmptyValue,isNull,isNumberObject,isObject,isObjectLoose,isObjectOrArray,isPropertyKey,isRegExp,isSafeInteger,isSet,isString,isStringObject,isSymbol,isTypedArray,isURL,isUndefined,isValidURL,isWeakMap,textContainsAll,textContainsAny};
|
package/dist/predicates/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{areArraysEqual,areObjectsEqual,areURLsEqualPath,areURLsIdentical,arrayHasAnyMatch,doesKeyExist,isArguments,isArrayLike,isArrayLikeObject,isCurrencyLike,isDeepEqual,isElement,isEmpty,isEmptyDeep,isEqualWith,isLength,isMatch,isMatchWith,isNative,isObjectLoose,isPropertyKey,isSafeInteger,isValidURL,isWeakMap,textContainsAll,textContainsAny}from"../chunk-XSFPU3YT.js";export{isURL}from"../chunk-ONZFBJVW.js";export{isNonEmptyValue,isTypedArray}from"../chunk-NXWPZDDX.js";export{isEmptyValue}from"../chunk-X4PD3I5U.js";export{isArrayBuffer,isEmptyArray,isEmptyObject,isEqual,isRegExp}from"../chunk-GRSCNTOK.js";import"../chunk-VEYMQ3UA.js";export{isFinite}from"../chunk-DUK2K4FB.js";export{isEmptyString}from"../chunk-TSLYDPBJ.js";import"../chunk-W2W3L2M5.js";export{isInteger}from"../chunk-WVSPXFTY.js";export{isDate,isMap}from"../chunk-L73TOPX5.js";export{isBigInt}from"../chunk-QNKGP5DY.js";export{getPreciseType,hasOwnProp,isArray,isBoolean,isBooleanObject,isBuffer,isError,isFunction,isInfinityNumber,isNaN,isNil,isNonEmptyArray,isNonEmptyString,isNull,isNumber,isNumberObject,isObject,isObjectOrArray,isPlainObject,isSet,isString,isStringObject,isSymbol,isUndefined}from"../chunk-2UIRWYE3.js";
|
package/dist/promise/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var e=require("../chunk-MHXVVDRQ.cjs");require("../chunk-DVMHRLKP.cjs"),require("../chunk-DQFU3KLE.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"delay",{enumerable:!0,get:function(){return e.delay}});
|
package/dist/promise/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{delay}from"../chunk-URGK5UQT.js";import"../chunk-WVSPXFTY.js";import"../chunk-L73TOPX5.js";import"../chunk-QNKGP5DY.js";import"../chunk-2UIRWYE3.js";
|