@rzl-zone/utils-js 3.13.0-beta.2 → 3.13.0
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 +4 -4
- package/dist/.references/index.d.cts +1 -1
- package/dist/.references/index.d.ts +1 -1
- package/dist/{assertIsArray-BqjMoan3.cjs → assertIsArray-BgdgVjDu.cjs} +3 -3
- package/dist/{assertIsArray-BqjMoan3.cjs.map → assertIsArray-BgdgVjDu.cjs.map} +1 -1
- package/dist/{assertIsArray-6BcSdNa-.js → assertIsArray-hZyYKvLb.js} +3 -3
- package/dist/{assertIsArray-6BcSdNa-.js.map → assertIsArray-hZyYKvLb.js.map} +1 -1
- package/dist/{assertIsBoolean-Bv6gL-xe.js → assertIsBoolean-9-huIcIR.js} +2 -2
- package/dist/{assertIsBoolean-Bv6gL-xe.js.map → assertIsBoolean-9-huIcIR.js.map} +1 -1
- package/dist/{assertIsBoolean-amRiJHnh.cjs → assertIsBoolean-JGpkg5ju.cjs} +2 -2
- package/dist/{assertIsBoolean-amRiJHnh.cjs.map → assertIsBoolean-JGpkg5ju.cjs.map} +1 -1
- package/dist/{assertIsString-1WiUjgqf.js → assertIsString-CcOpQqcv.js} +3 -3
- package/dist/{assertIsString-1WiUjgqf.js.map → assertIsString-CcOpQqcv.js.map} +1 -1
- package/dist/{assertIsString-C0b28AU1.cjs → assertIsString-UR6QjqyZ.cjs} +3 -3
- package/dist/{assertIsString-C0b28AU1.cjs.map → assertIsString-UR6QjqyZ.cjs.map} +1 -1
- package/dist/assertions/index.cjs +5 -5
- package/dist/assertions/index.d.cts +2 -2
- package/dist/assertions/index.d.ts +2 -2
- package/dist/assertions/index.js +5 -5
- package/dist/conversions/index.cjs +6 -6
- package/dist/conversions/index.d.cts +2 -2
- package/dist/conversions/index.d.ts +2 -2
- package/dist/conversions/index.js +6 -6
- package/dist/{conversions-lvvAYiZs.cjs → conversions-DLt2zlyu.cjs} +12 -12
- package/dist/{conversions-lvvAYiZs.cjs.map → conversions-DLt2zlyu.cjs.map} +1 -1
- package/dist/{conversions-BrI0GIOr.js → conversions-Du6GC5JA.js} +12 -12
- package/dist/{conversions-BrI0GIOr.js.map → conversions-Du6GC5JA.js.map} +1 -1
- package/dist/events/index.cjs +4 -4
- package/dist/events/index.d.cts +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +4 -4
- package/dist/formatters/index.cjs +2 -2
- package/dist/formatters/index.d.cts +2 -2
- package/dist/formatters/index.d.ts +2 -2
- package/dist/formatters/index.js +2 -2
- package/dist/{formatters-DQr05EUA.cjs → formatters-C0t5CdX-.cjs} +10 -10
- package/dist/{formatters-DQr05EUA.cjs.map → formatters-C0t5CdX-.cjs.map} +1 -1
- package/dist/{formatters-zDzQvtb4.js → formatters-RomzqDp_.js} +10 -10
- package/dist/{formatters-zDzQvtb4.js.map → formatters-RomzqDp_.js.map} +1 -1
- package/dist/generators/index.cjs +5 -5
- package/dist/generators/index.d.cts +2 -2
- package/dist/generators/index.d.ts +2 -2
- package/dist/generators/index.js +5 -5
- package/dist/{index-GSUN6rjA.d.ts → index-50G4edI1.d.ts} +2 -2
- package/dist/{index-DxZlGbAH.d.ts → index-5DpyzfpU.d.ts} +1 -1
- package/dist/{index-BlTCrSyc.d.cts → index-B6Xg9Z8l.d.ts} +2 -2
- package/dist/{index-3jBnthag.d.cts → index-BFI4R7Pn.d.ts} +1 -1
- package/dist/{index-Ckao53JY.d.ts → index-BcKPWWfh.d.ts} +2 -2
- package/dist/{index-CEm8ZOvj.d.ts → index-CMcxcN7w.d.cts} +2 -2
- package/dist/{index-_dJhBl1h.d.ts → index-CPc-TTMc.d.cts} +1 -1
- package/dist/{index-DIeR8qa-.d.ts → index-D-5AsV9K.d.cts} +1 -1
- package/dist/{index-bMa-0Yr4.d.cts → index-DM_0q4CY.d.cts} +1 -1
- package/dist/{index-z_uCh5KW.d.cts → index-DoteSYTy.d.cts} +1 -1
- package/dist/{index-DHHrLc0B.d.ts → index-bGRsmkyA.d.ts} +1 -1
- package/dist/{index-DyVWeYP3.d.cts → index-hsSSKuvW.d.ts} +1 -1
- package/dist/{index-BXwimNPA.d.cts → index-s7h0w-8H.d.cts} +2 -2
- package/dist/{index-CLq5kZmQ.d.cts → index-tYmZ3X4Y.d.cts} +2 -2
- package/dist/{isBigInt-CIFRnsdx.cjs → isBigInt-C0gHDkh4.cjs} +2 -2
- package/dist/{isBigInt-CIFRnsdx.cjs.map → isBigInt-C0gHDkh4.cjs.map} +1 -1
- package/dist/{isBigInt-D-Pu9sxp.js → isBigInt-bbW78ITJ.js} +2 -2
- package/dist/{isBigInt-D-Pu9sxp.js.map → isBigInt-bbW78ITJ.js.map} +1 -1
- package/dist/{isEmptyObject-CZ9DLi7R.js → isEmptyObject-CZsFdN7x.js} +3 -3
- package/dist/{isEmptyObject-CZ9DLi7R.js.map → isEmptyObject-CZsFdN7x.js.map} +1 -1
- package/dist/{isEmptyObject-CEySmyHK.cjs → isEmptyObject-D-fETD_f.cjs} +3 -3
- package/dist/{isEmptyObject-CEySmyHK.cjs.map → isEmptyObject-D-fETD_f.cjs.map} +1 -1
- package/dist/{isEmptyString-DI64RQCy.cjs → isEmptyString-Dx6OM5PL.cjs} +3 -3
- package/dist/{isEmptyString-DI64RQCy.cjs.map → isEmptyString-Dx6OM5PL.cjs.map} +1 -1
- package/dist/{isEmptyString-DFDtBbNr.js → isEmptyString-pmcf-orv.js} +3 -3
- package/dist/{isEmptyString-DFDtBbNr.js.map → isEmptyString-pmcf-orv.js.map} +1 -1
- package/dist/{isEmptyValue-aGyeClwA.js → isEmptyValue-CkiXENcT.js} +5 -5
- package/dist/{isEmptyValue-aGyeClwA.js.map → isEmptyValue-CkiXENcT.js.map} +1 -1
- package/dist/{isEmptyValue-Cw6ovu7z.cjs → isEmptyValue-v6BsHBiu.cjs} +5 -5
- package/dist/{isEmptyValue-Cw6ovu7z.cjs.map → isEmptyValue-v6BsHBiu.cjs.map} +1 -1
- package/dist/{isEqual-UsvOwrlY.cjs → isEqual-CZxetLzm.cjs} +4 -4
- package/dist/{isEqual-UsvOwrlY.cjs.map → isEqual-CZxetLzm.cjs.map} +1 -1
- package/dist/{isEqual-Dtb2sXUv.js → isEqual-Dc8fNB2J.js} +4 -4
- package/dist/{isEqual-Dtb2sXUv.js.map → isEqual-Dc8fNB2J.js.map} +1 -1
- package/dist/{isFinite-uukWvxJh.cjs → isFinite-0z31xOa2.cjs} +3 -3
- package/dist/{isFinite-uukWvxJh.cjs.map → isFinite-0z31xOa2.cjs.map} +1 -1
- package/dist/{isFinite-Cz_IFXuV.js → isFinite-CI59vUHt.js} +3 -3
- package/dist/{isFinite-Cz_IFXuV.js.map → isFinite-CI59vUHt.js.map} +1 -1
- package/dist/{isInteger-DPYjliLZ.cjs → isInteger-DUhd-dyt.cjs} +2 -2
- package/dist/{isInteger-DPYjliLZ.cjs.map → isInteger-DUhd-dyt.cjs.map} +1 -1
- package/dist/{isInteger-DZ163OQg.js → isInteger-DeN5FIAr.js} +2 -2
- package/dist/{isInteger-DZ163OQg.js.map → isInteger-DeN5FIAr.js.map} +1 -1
- package/dist/{isPlainObject-CBABRyEX.d.cts → isPlainObject-CjoJH9yk.d.ts} +1 -1
- package/dist/{isPlainObject-Dr8gi89U.d.ts → isPlainObject-DvxdHoAf.d.cts} +1 -1
- package/dist/{isServer-BDShLyVJ.js → isServer-BM5GzRpI.js} +2 -2
- package/dist/{isServer-BDShLyVJ.js.map → isServer-BM5GzRpI.js.map} +1 -1
- package/dist/{isServer-BzDeYuGg.cjs → isServer-TOmhgOtP.cjs} +2 -2
- package/dist/{isServer-BzDeYuGg.cjs.map → isServer-TOmhgOtP.cjs.map} +1 -1
- package/dist/{isTypedArray-DuUUA4CL.js → isTypedArray-BPerK072.js} +3 -3
- package/dist/{isTypedArray-DuUUA4CL.js.map → isTypedArray-BPerK072.js.map} +1 -1
- package/dist/{isTypedArray-DaYAkyrt.cjs → isTypedArray-pAdBFUDl.cjs} +3 -3
- package/dist/{isTypedArray-DaYAkyrt.cjs.map → isTypedArray-pAdBFUDl.cjs.map} +1 -1
- package/dist/{isValidDomain-BxyToAlh.cjs → isValidDomain-BMcr9vTp.cjs} +6 -6
- package/dist/isValidDomain-BMcr9vTp.cjs.map +1 -0
- package/dist/{isValidDomain-CTw5vZFY.js → isValidDomain-CHKOn79-.js} +6 -6
- package/dist/isValidDomain-CHKOn79-.js.map +1 -0
- package/dist/{noop-DGg9vMSD.js → noop-BaNz9ls5.js} +2 -2
- package/dist/{noop-DGg9vMSD.js.map → noop-BaNz9ls5.js.map} +1 -1
- package/dist/{noop-7KrqC9DC.cjs → noop-D4g9yTAW.cjs} +2 -2
- package/dist/{noop-7KrqC9DC.cjs.map → noop-D4g9yTAW.cjs.map} +1 -1
- package/dist/{normalizeSpaces-C1eLwykD.js → normalizeSpaces-DupusmF5.js} +3 -3
- package/dist/{normalizeSpaces-C1eLwykD.js.map → normalizeSpaces-DupusmF5.js.map} +1 -1
- package/dist/{normalizeSpaces-B6ZQOZRX.cjs → normalizeSpaces-MWiYtSyS.cjs} +3 -3
- package/dist/{normalizeSpaces-B6ZQOZRX.cjs.map → normalizeSpaces-MWiYtSyS.cjs.map} +1 -1
- package/dist/operations/index.cjs +7 -7
- package/dist/operations/index.d.cts +1 -1
- package/dist/operations/index.d.ts +1 -1
- package/dist/operations/index.js +7 -7
- package/dist/parsers/index.cjs +2 -2
- package/dist/parsers/index.d.cts +1 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +2 -2
- package/dist/{parsers-DEFpCYhw.cjs → parsers-Bd-YRt6j.cjs} +4 -4
- package/dist/{parsers-DEFpCYhw.cjs.map → parsers-Bd-YRt6j.cjs.map} +1 -1
- package/dist/{parsers-bQQ9mStV.js → parsers-Dl9fFra4.js} +4 -4
- package/dist/{parsers-bQQ9mStV.js.map → parsers-Dl9fFra4.js.map} +1 -1
- package/dist/{parsing-BngARhmu.js → parsing-BG73HUrI.js} +3 -3
- package/dist/{parsing-BngARhmu.js.map → parsing-BG73HUrI.js.map} +1 -1
- package/dist/{parsing-lI5EN4LY.cjs → parsing-CU_Mc7CF.cjs} +3 -3
- package/dist/{parsing-lI5EN4LY.cjs.map → parsing-CU_Mc7CF.cjs.map} +1 -1
- package/dist/predicates/index.cjs +14 -14
- package/dist/predicates/index.d.cts +3 -3
- package/dist/predicates/index.d.ts +3 -3
- package/dist/predicates/index.js +14 -14
- package/dist/{predicates-CMmP3fPJ.cjs → predicates-Bd4AnXr0.cjs} +11 -11
- package/dist/{predicates-CMmP3fPJ.cjs.map → predicates-Bd4AnXr0.cjs.map} +1 -1
- package/dist/{predicates-V87QD8hs.js → predicates-VJN-VDha.js} +11 -11
- package/dist/{predicates-V87QD8hs.js.map → predicates-VJN-VDha.js.map} +1 -1
- package/dist/promises/index.cjs +4 -4
- package/dist/promises/index.d.cts +1 -1
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +4 -4
- package/dist/{punyCode-DmTsB7q_.cjs → punyCode-5wmummgP.cjs} +4 -4
- package/dist/{punyCode-DmTsB7q_.cjs.map → punyCode-5wmummgP.cjs.map} +1 -1
- package/dist/{punyCode-BeFYDjj0.js → punyCode-C0ft9dER.js} +4 -4
- package/dist/{punyCode-BeFYDjj0.js.map → punyCode-C0ft9dER.js.map} +1 -1
- package/dist/{removeSpaces-C8mu_yp3.cjs → removeSpaces-CPj1ABLa.cjs} +3 -3
- package/dist/{removeSpaces-C8mu_yp3.cjs.map → removeSpaces-CPj1ABLa.cjs.map} +1 -1
- package/dist/{removeSpaces-B96axxP6.js → removeSpaces-DpiJ1H1P.js} +3 -3
- package/dist/{removeSpaces-B96axxP6.js.map → removeSpaces-DpiJ1H1P.js.map} +1 -1
- package/dist/rzl-utils.global.js +1 -1
- package/dist/{safeJsonParse-DyCsTXlU.js → safeJsonParse-BxOZgGy7.js} +6 -6
- package/dist/{safeJsonParse-DyCsTXlU.js.map → safeJsonParse-BxOZgGy7.js.map} +1 -1
- package/dist/{safeJsonParse-BXbtX_j7.cjs → safeJsonParse-v7ll9iFG.cjs} +6 -6
- package/dist/{safeJsonParse-BXbtX_j7.cjs.map → safeJsonParse-v7ll9iFG.cjs.map} +1 -1
- package/dist/{safeStableStringify-DRYQ56Dg.cjs → safeStableStringify-BiUOLBYo.cjs} +4 -4
- package/dist/{safeStableStringify-DRYQ56Dg.cjs.map → safeStableStringify-BiUOLBYo.cjs.map} +1 -1
- package/dist/{safeStableStringify-BrOcdX9n.js → safeStableStringify-C5Gc3ZED.js} +4 -4
- package/dist/{safeStableStringify-BrOcdX9n.js.map → safeStableStringify-C5Gc3ZED.js.map} +1 -1
- package/dist/strings/index.cjs +5 -5
- package/dist/strings/index.d.cts +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +5 -5
- package/dist/tailwind/index.cjs +2 -2
- package/dist/tailwind/index.d.cts +2 -2
- package/dist/tailwind/index.d.ts +2 -2
- package/dist/tailwind/index.js +2 -2
- package/dist/{tailwind-BZ2_MeNX.js → tailwind-CxI2DXpR.js} +5 -5
- package/dist/{tailwind-BZ2_MeNX.js.map → tailwind-CxI2DXpR.js.map} +1 -1
- package/dist/{tailwind-C1YtxJ-K.cjs → tailwind-DhKiKZAc.cjs} +5 -5
- package/dist/{tailwind-C1YtxJ-K.cjs.map → tailwind-DhKiKZAc.cjs.map} +1 -1
- package/dist/{toStringArrayUnRecursive-tHp2a7KR.js → toStringArrayUnRecursive-BaZrCGaR.js} +6 -6
- package/dist/{toStringArrayUnRecursive-tHp2a7KR.js.map → toStringArrayUnRecursive-BaZrCGaR.js.map} +1 -1
- package/dist/{toStringArrayUnRecursive-D1mPM4wg.cjs → toStringArrayUnRecursive-BuRBWRcB.cjs} +6 -6
- package/dist/{toStringArrayUnRecursive-D1mPM4wg.cjs.map → toStringArrayUnRecursive-BuRBWRcB.cjs.map} +1 -1
- package/dist/urls/index.cjs +3 -3
- package/dist/urls/index.d.cts +1 -1
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +3 -3
- package/dist/{urls-DCyx8Wpk.cjs → urls-CyhKg1Cn.cjs} +11 -11
- package/dist/{urls-DCyx8Wpk.cjs.map → urls-CyhKg1Cn.cjs.map} +1 -1
- package/dist/{urls-CoxDAoki.js → urls-nr2hUK75.js} +11 -11
- package/dist/{urls-CoxDAoki.js.map → urls-nr2hUK75.js.map} +1 -1
- package/package.json +5 -5
- package/dist/isValidDomain-BxyToAlh.cjs.map +0 -1
- package/dist/isValidDomain-CTw5vZFY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-bQQ9mStV.js","names":[],"sources":["../src/parsers/_private/extensions.ts","../src/parsers/extractFileName.ts"],"sourcesContent":["// ==========================\n// Single extensions\n// ==========================\nexport const EXTENSIONS_FILE = new Set([\n // 📄 Text & Document\n \"txt\",\n \"md\",\n \"rtf\",\n \"tex\",\n \"doc\",\n \"docx\",\n \"odt\",\n \"ott\",\n \"pdf\",\n \"djvu\",\n \"epub\",\n \"fb2\",\n \"lit\",\n \"lrf\",\n \"xls\",\n \"xlsx\",\n \"ods\",\n \"csv\",\n \"tsv\",\n \"ppt\",\n \"pptx\",\n \"pps\",\n \"bib\",\n \"cba\",\n \"cbt\",\n \"cbz\",\n \"cbr\",\n \"opds\",\n \"fodt\",\n \"pages\",\n \"rtfd\",\n \"sxc\",\n \"sxw\",\n \"wpd\",\n \"xps\",\n \"dotx\",\n \"dotm\",\n \"xltx\",\n \"xltm\",\n \"sldx\",\n \"sldm\",\n \"fods\",\n \"mdx\",\n \"markdown\",\n \"texi\",\n \"textile\",\n\n // 🖼️ Image\n \"jpg\",\n \"jpeg\",\n \"png\",\n \"gif\",\n \"bmp\",\n \"tif\",\n \"tiff\",\n \"webp\",\n \"svg\",\n \"ico\",\n \"heif\",\n \"heic\",\n \"raw\",\n \"cr2\",\n \"nef\",\n \"orf\",\n \"sr2\",\n \"dng\",\n \"dds\",\n \"psd\",\n \"exr\",\n \"xcf\",\n \"ai\",\n \"eps\",\n \"cdr\",\n \"indd\",\n \"pcx\",\n \"pgm\",\n \"ppm\",\n \"pbm\",\n \"pnm\",\n \"jfif\",\n \"ras\",\n \"tga\",\n \"j2k\",\n \"jp2\",\n \"emf\",\n \"wmf\",\n \"hdp\",\n \"mdi\",\n \"hevc\",\n\n // 🎵 Audio\n \"mp3\",\n \"wav\",\n \"ogg\",\n \"flac\",\n \"aac\",\n \"m4a\",\n \"wma\",\n \"alac\",\n \"aiff\",\n \"aif\",\n \"amr\",\n \"mid\",\n \"midi\",\n \"opus\",\n \"au\",\n \"caf\",\n \"ape\",\n \"mka\",\n \"spx\",\n \"ra\",\n \"ram\",\n \"mpc\",\n \"wv\",\n \"aifc\",\n \"mod\",\n \"it\",\n \"s3m\",\n \"xm\",\n \"kar\",\n \"m4b\",\n \"voc\",\n \"snd\",\n \"a52\",\n \"ac3\",\n \"dts\",\n\n // 🎥 Video\n \"mp4\",\n \"mkv\",\n \"avi\",\n \"mov\",\n \"wmv\",\n \"webm\",\n \"mpeg\",\n \"mpg\",\n \"3gp\",\n \"3g2\",\n \"m4v\",\n \"ts\",\n \"mts\",\n \"asf\",\n \"rm\",\n \"rmvb\",\n \"vob\",\n \"f4v\",\n \"ogv\",\n \"m2ts\",\n \"dav\",\n \"mxf\",\n \"mjpeg\",\n \"flv\",\n \"divx\",\n \"f4a\",\n \"f4p\",\n \"m2v\",\n \"ogm\",\n \"vp8\",\n \"vp9\",\n \"xvid\",\n \"yuv\",\n \"mng\",\n \"dv\",\n \"m1v\",\n \"roq\",\n \"m2t\",\n \"av1\",\n \"hevc\",\n \"m3u\",\n \"m3u8\",\n\n // 🗃️ Archive & Compression\n \"zip\",\n \"rar\",\n \"7z\",\n \"tar\",\n \"gz\",\n \"bz\",\n \"bz2\",\n \"xz\",\n \"tgz\",\n \"tbz2\",\n \"txz\",\n \"lz\",\n \"lzma\",\n \"z\",\n \"cab\",\n \"arj\",\n \"ace\",\n \"rpm\",\n \"deb\",\n \"pkg\",\n \"apk\",\n \"jar\",\n \"war\",\n \"ear\",\n \"sit\",\n \"sitx\",\n \"cpgz\",\n \"tlz\",\n \"tlzma\",\n \"tzo\",\n \"cpio\",\n \"shar\",\n \"bzip\",\n \"gzip\",\n \"7zip\",\n \"rar5\",\n \"tbz\",\n \"txz\",\n\n // 💾 Disk Image\n \"iso\",\n \"img\",\n \"vhd\",\n \"vmdk\",\n \"qcow2\",\n \"vhdx\",\n \"bin\",\n \"cue\",\n \"nrg\",\n \"daa\",\n \"sdi\",\n \"vfd\",\n \"ima\",\n \"dmg\",\n \"vdi\",\n \"toast\",\n \"ccd\",\n \"mdf\",\n \"cdi\",\n \"bif\",\n \"bifc\",\n \"bifd\",\n\n // 🗃️ Database & Data\n \"sql\",\n \"db\",\n \"dbf\",\n \"mdb\",\n \"accdb\",\n \"json\",\n \"toml\",\n \"ini\",\n \"log\",\n \"plist\",\n \"pkl\",\n \"msgpack\",\n \"h5\",\n \"hdf5\",\n \"parquet\",\n \"avro\",\n \"orc\",\n \"ndjson\",\n \"pdb\",\n \"sqlite\",\n \"sqlite3\",\n \"dbx\",\n \"sdf\",\n \"nc\",\n \"netcdf\",\n \"grib\",\n \"geojson\",\n \"gml\",\n \"hjson\",\n \"cdb\",\n \"db3\",\n \"dta\",\n \"sav\",\n \"sas7bdat\",\n \"ldif\",\n \"fdb\",\n \"gdb\",\n \"sqlite2\",\n \"h5ad\",\n \"nc4\",\n \"xmind\",\n \"drawio\",\n \"sdc\",\n \"jsonl\",\n \"yaml\",\n \"yml\",\n \"toml\",\n\n // 💻 Code & Script\n \"js\",\n \"jsx\",\n \"ts\",\n \"tsx\",\n \"c\",\n \"cpp\",\n \"net\",\n \"h\",\n \"hpp\",\n \"java\",\n \"py\",\n \"rb\",\n \"go\",\n \"rs\",\n \"php\",\n \"pl\",\n \"sh\",\n \"bat\",\n \"cmd\",\n \"ps1\",\n \"lua\",\n \"swift\",\n \"kt\",\n \"scala\",\n \"cs\",\n \"vb\",\n \"dart\",\n \"m\",\n \"r\",\n \"jl\",\n \"fs\",\n \"vbproj\",\n \"sln\",\n \"pri\",\n \"gemspec\",\n \"gradle\",\n \"coffee\",\n \"erl\",\n \"ex\",\n \"exs\",\n \"hs\",\n \"lisp\",\n \"clj\",\n \"groovy\",\n \"scm\",\n \"vbs\",\n \"nim\",\n \"rkt\",\n \"ml\",\n \"mli\",\n \"fsx\",\n \"psm1\",\n \"cbl\",\n \"for\",\n \"f90\",\n \"lock\",\n \"tsconfig\",\n \"vue\",\n \"svelte\",\n \"cjs\",\n \"mjs\",\n \"mts\",\n \"cts\",\n \"json5\",\n \"es6\",\n \"module\",\n \"systemjs\",\n\n // 🌐 Web & Config\n \"html\",\n \"htm\",\n \"xhtml\",\n \"css\",\n \"scss\",\n \"sass\",\n \"less\",\n \"xml\",\n \"xlf\",\n \"po\",\n \"pot\",\n \"jsp\",\n \"asp\",\n \"aspx\",\n \"jspf\",\n \"cgi\",\n \"cfm\",\n \"env\",\n \"babelrc\",\n \"cfg\",\n \"config\",\n \"conf\",\n \"editorconfig\",\n \"eslintrc\",\n \"gitconfig\",\n \"gitattributes\",\n \"gitignore\",\n \"prettierrc\",\n \"webmanifest\",\n \"dockerfile\",\n // \".dockerfile\",\n\n // 🔠 Font\n \"ttf\",\n \"otf\",\n \"woff\",\n \"woff2\",\n \"eot\",\n \"dfont\",\n \"pfa\",\n \"pfb\",\n \"fon\",\n \"fnt\",\n \"bdf\",\n \"ps\",\n\n // 🗺️ CAD & GIS\n \"dwg\",\n \"dxf\",\n \"shp\",\n \"kml\",\n \"kmz\",\n \"gpx\",\n \"stl\",\n \"step\",\n \"iges\",\n \"igs\",\n \"3ds\",\n \"3dm\",\n \"fbx\",\n \"obj\",\n \"dae\",\n \"ifc\",\n\n // 🔧 System / Binary / Execution\n \"exe\",\n \"msi\",\n \"run\",\n \"com\",\n \"app\",\n \"elf\",\n \"dll\",\n \"so\",\n \"dylib\",\n \"sys\",\n \"scr\",\n \"bin\",\n \"out\",\n\n // 🔐 Certificates / Crypto\n \"pem\",\n \"crt\",\n \"cer\",\n \"der\",\n \"csr\",\n \"p12\",\n \"pfx\",\n \"jks\",\n \"asc\",\n \"gpg\",\n \"pgp\",\n \"p7b\",\n \"p7c\",\n \"spc\",\n \"key\",\n \"pub\",\n \"cert\",\n \"p7m\",\n\n // 🎮 Games & Projects\n \"nes\",\n \"sfc\",\n \"gba\",\n \"nds\",\n \"rom\",\n \"pak\",\n \"vpk\",\n \"bik\",\n \"cso\",\n \"wad\",\n \"wadx\",\n \"smc\",\n \"gb\",\n \"gbc\",\n\n // 🔬 Bioinformatics\n \"fasta\",\n \"fa\",\n \"fas\",\n \"ffn\",\n \"faa\",\n \"fna\",\n \"frn\",\n \"fastq\",\n \"fq\",\n \"bam\",\n \"bed\",\n \"sam\",\n \"vcf\",\n \"gff\",\n \"gff3\",\n \"gtf\",\n \"fai\",\n \"tbi\",\n \"fast5\",\n \"fqz\",\n \"fq5\"\n]);\n\n// ==========================\n// Double extensions\n// ==========================\nexport const DOUBLE_EXTENSIONS_FILE = new Set([\n \"log.gz\",\n \"tar.gz\",\n \"tar.bz2\",\n \"tar.bz\",\n \"tar.xz\",\n \"tar.lz\",\n \"tar.lzma\",\n \"tar.Z\",\n \"tar.zst\",\n \"tar.lz4\",\n \"log.gz\",\n \"sql.gz\",\n \"csv.gz\",\n \"tsv.gz\",\n \"json.gz\",\n \"ndjson.gz\",\n \"fq.gz\",\n \"sam.gz\",\n \"fasta.gz\",\n \"fa.gz\",\n \"ffn.gz\",\n \"faa.gz\",\n \"fna.gz\",\n \"frn.gz\",\n \"fastq.gz\",\n \"js.map\",\n \"css.map\"\n]);\n\n// ==========================\n// Special filenames\n// ==========================\nexport const SPECIAL_FILENAMES = new Set([\n \"Makefile\",\n \"Dockerfile\",\n \".dockerignore\",\n \".npmrc\",\n \".envrc\",\n \".htgroup\",\n \".eslintignore\",\n \".env.test\",\n \".env.local\",\n \".env.production\",\n \".env.development\",\n \".env.example\",\n \".dockerfile\",\n \".htaccess\",\n \".htpasswd\",\n \".babelrc\",\n \".eslintrc\",\n \".editorconfig\",\n \".prettierignore\",\n \"docker-compose.override.yml\",\n \"docker-compose.yml\",\n \"Vagrantfile\",\n \"Procfile\",\n \"Gemfile\",\n \"Rakefile\",\n \"package.json\",\n \"package-lock.json\",\n \"yarn.lock\",\n \"pnpm-lock.yaml\",\n \"tsconfig.json\",\n \"webpack.config.js\",\n \"vite.config.js\",\n \"vite.config.ts\",\n \"Gruntfile.js\",\n \"gulpfile.js\",\n \"babel.config.js\",\n \"babel.js\",\n \"rollup.js\",\n\n // SPECIAL PRESERVE NAME\n \"CON\",\n \"NUL\",\n \"PRN\",\n \"AUX\",\n \"COM1\",\n \"COM2\",\n \"COM3\",\n \"COM4\",\n \"COM5\",\n \"COM6\",\n \"COM7\",\n \"COM8\",\n \"COM9\",\n \"LPT1\",\n \"LPT2\",\n \"LPT3\",\n \"LPT4\",\n \"LPT5\",\n \"LPT6\",\n \"LPT7\",\n \"LPT8\",\n \"LPT9\"\n]);\n","import { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\nimport {\n DOUBLE_EXTENSIONS_FILE,\n EXTENSIONS_FILE,\n SPECIAL_FILENAMES\n} from \"./_private/extensions\";\n\nimport { punycodeUtilsJS } from \"@/urls/utils/punyCode\";\n\nimport { assertIsBoolean } from \"@/assertions/booleans/assertIsBoolean\";\nimport { assertIsPlainObject } from \"@/assertions/objects/assertIsPlainObject\";\n\nexport type ExtractFileNameOptions = {\n /** ----------------------------------------------------------\n * * ***Indicates whether the input should be treated as a potential domain string.***\n * ----------------------------------------------------------\n *\n * - Behavior when `true`:\n * - The `domainName` option is required and must be a string and non-empty string.\n * If `domainName` is `undefined`, `null`, or an empty string, a `TypeError` will be thrown.\n * - The `domainName` is used to determine if the input is a domain-only string.\n * - Returns `null` if the input exactly matches `domainName` or any of its subdomains **and** has no additional path or filename.\n * - If the input does not match `domainName` or its subdomains, it will be processed as a regular file-like name.\n * - Supports **Unicode/IDN domains** (e.g., `tést-ドメイン.com`) and **ASCII filenames**, mixed safely.\n *\n * @default false\n */\n domainAware?: boolean;\n\n /** ----------------------------------------------------------\n * * ***The base domain name used for comparison (e.g., `\"example.com\"`).***\n * ----------------------------------------------------------\n *\n * - Required when `domainAware` is `true`.\n * - Helps differentiate between a domain-only input (ignored) and a standalone file-like string (processed normally).\n * - Must be a string and non-empty string. Invalid values (`undefined`, `null`, or empty string) will trigger a `TypeError`.\n * - Works with both **ASCII domains** and **Unicode/IDN domains**.\n * - Example:\n * ```ts *\n * // ASCII domain + ASCII filename\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"resume\"\n * extractFileName(\"example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null (because input is treated as domain-name)\n *\n * // Unicode domain + ASCII filename\n * extractFileName(\"tést-ドメイン.com/file.txt\", {\n * domainAware: true,\n * domainName: \"ドメイン.com\"\n * });\n * // ➔ \"file\"\n *\n * // Unicode domain + Unicode filename\n * extractFileName(\"tést-ドメイン.com/ファイル名.pdf\", {\n * domainAware: true,\n * domainName: \"ドメイン.com\"\n * });\n * // ➔ \"ファイル名\"\n *\n * // Invalid domainName, will throw TypeError\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"\"\n * });\n * // ➔ TypeError\n * ```\n *\n * @default undefined\n */\n domainName?: string;\n};\n\n/** ----------------------------------------------------------\n * * ***Utility: `extractFileName`.***\n * ----------------------------------------------------------\n *\n * **Extracts the **clean base filename** from nearly any input string, including URLs, local file paths,\n * UNC paths, and plain filenames.**\n *\n * - It automatically safely handles extracts the **base file name** (without extension) from:\n * - File system paths (Windows, Unix, UNC)\n * - Protocols like http, https, ftp, file, mailto, or custom schemes\n * - Percent-encoded, Unicode, and emoji characters\n * - Dotfiles, reserved OS names, multi-part extensions\n * - Data URIs\n * - Optional domain-aware mode to ignore domain-only inputs\n * - Plain filenames\n *\n * - Full support for:\n * - Unicode, emoji, percent-encoding\n * - Dotfiles (e.g., `.env`, `.gitignore`)\n * - Reserved/OS-protected filenames:\n * `CON`, `PRN`, `AUX`, `NUL`, `COM1`–`COM9`, `LPT1`–`LPT9`\n * - Known multi-part extensions:\n * `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.lz`, `.tar.zst`, `.min.js`, `.js.map`, `.log.gz`, `.sql.gz`,\n * `.backup.tar`, etc.\n * - Data URIs (`data:[mime];base64,...` ➔ payload string)\n * - Domain-aware mode (optional)\n *\n * ----------------------------------------------------------\n * - **Behavior / Features**\n * - Strips **known extensions**, including multi-part and common double/triple extensions.\n * - Leaves unknown/custom extensions intact.\n * - Preserves **dotfiles** as-is (leading dot preserved).\n * - Returns `null` if:\n * - input is `null`, `undefined`, or not a string\n * - input is empty, whitespace-only, or only slashes\n * - input represents a folder path (trailing slash/backslash, drive/folder only)\n * - input is a **domain-only string** in domain-aware mode\n * - Normalizes Windows-style backslashes (`\\`) internally as `/`.\n * - Supports UNC paths, mixed slashes, and Windows drive letters safely.\n * - Handles URLs:\n * - Ignores query strings (`?v=1.2.3`) and hash fragments (`#section`)\n * - Decodes percent-encoded filenames (`my%20file.txt` ➔ `my file.txt`)\n * - Supports protocol-relative URLs (`//cdn.example.com/file.jpg`)\n * - Supports uncommon/custom protocols (`ftp://`, `file://`, `mailto:`, etc.)\n * - Handles **multiple dots**, **trailing dots**, **triple or more extensions**\n * - Supports filenames on mixed Unicode/ASCII domains:\n * - Domain names can include Unicode characters (IDN / punycode)\n * - Filenames may contain ASCII, Unicode, and emoji characters\n * - Works correctly when domain is Unicode and filename is ASCII, or vice versa\n * - Supports extremely long filenames safely (up to OS limits)\n * - Domain-aware mode (`domainAware: true` + `domainName`):\n * - Parameter `domainName` must be a string and non-empty string; otherwise a TypeError is thrown.\n * - Returns `null` if input equals `domainName` or any subdomain with no file path\n * - Extracts filename normally if path/file exists on domain or other domain\n * - Safe in Node.js and browsers\n *\n * ----------------------------------------------------------\n * @param {string | null | undefined} input\n * URL, file path, or plain filename to extract from.\n *\n * @param {ExtractFileNameOptions} [options]\n * Optional configuration:\n * - `domainAware?: boolean` – treat input as a domain string. Requires `domainName` to be a string and non-empty string; otherwise, a TypeError is thrown.\n * - `domainName?: string` – base domain for comparison eg (`example.com`), required when `domainAware` is true.\n *\n * @returns {string | null}\n * - Base filename without known extensions\n * - Original filename if extension unknown\n * - `null` for invalid inputs, folder paths, or domain-only strings\n *\n * ----------------------------------------------------------\n * @example\n * ```ts\n * // Basic files\n * extractFileName(\"document.pdf\"); // ➔ \"document\"\n * extractFileName(\"/files/archive.tar.gz\"); // ➔ \"archive\"\n * extractFileName(\"C:\\\\path\\\\file.txt\"); // ➔ \"file\"\n * extractFileName(\".env\"); // ➔ \".env\"\n * extractFileName(\"folder/\"); // ➔ null\n *\n * // Not a file\n * extractFileName(\"not-file\"); // ➔ null\n * extractFileName(\"not-file/\"); // ➔ null\n * extractFileName(\"/not-file/\"); // ➔ null\n * extractFileName(\"/not-file\"); // ➔ null\n *\n * // URLs with queries, hashes, protocols\n * extractFileName(\"https://example.com/file.txt?ver=1\"); // ➔ \"file\"\n * extractFileName(\"https://example.com/archive.tar.gz#part\"); // ➔ \"archive\"\n * extractFileName(\"//cdn.example.com/image.png\"); // ➔ \"image\"\n *\n *\n * // Special protocol handling\n * extractFileName(\"tel:+6212345678\"); // ➔ \"+6212345678\"\n * extractFileName(\"sms:+6212345678\"); // ➔ \"+6212345678\"\n * extractFileName(\"mailto:user@domain.com\"); // ➔ \"user@domain\"\n * extractFileName(\"data:text/plain;base64,SGVsbG8=\"); // ➔ \"SGVsbG8=\"\n * extractFileName(\"mailto:resume.com\"); // ➔ \"resume\"\n * extractFileName(\"ftp://example.com/image.jpeg\"); // ➔ \"image\"\n * extractFileName(\"ftp://files.example.com/app.min.js\"); // ➔ \"app.min\"\n * extractFileName(\"file:///C:/path/to/document.pdf\"); // ➔ \"document\"\n * extractFileName(\"custom-scheme://example.com/video.mp4\"); // ➔ \"video\"\n *\n * // Unicode & emoji\n * extractFileName(\"emoji-😊.png\"); // ➔ \"emoji-😊\"\n * extractFileName(\"🔥project.tar.gz\"); // ➔ \"🔥project\"\n *\n * // Dotfiles\n * extractFileName(\".gitignore\"); // ➔ \".gitignore\"\n * extractFileName(\"/path/.bashrc\"); // ➔ \".bashrc\"\n *\n * // Mixed Unicode domain and ASCII filename\n * extractFileName(\"https://tést-ドメイン.com/file.txt\"); // ➔ \"file\"\n * extractFileName(\"https://example.com/ファイル名.pdf\"); // ➔ \"ファイル名\"\n * extractFileName(\"https://ドメイン例.com/emoji-🔥.png\"); // ➔ \"emoji-🔥\"\n *\n * // Reserved filenames\n * extractFileName(\"CON\"); // ➔ \"CON\"\n * extractFileName(\"NUL.txt\"); // ➔ \"NUL\"\n *\n * // Domain-aware mode\n * extractFileName(\"example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null\n * extractFileName(\"cdn.example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"resume\"\n * extractFileName(\"https://example.com/file.txt\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"file\"\n *\n * // Windows & UNC paths\n * extractFileName(\"C:\\\\Users\\\\rzl\\\\Documents\\\\file.txt\"); // ➔ \"file\"\n * extractFileName(\"\\\\\\\\SERVER\\\\share\\\\logs\\\\output.log\"); // ➔ \"output\"\n * extractFileName(\"C:/Users\\\\rzl/mix\\\\test.pdf\"); // ➔ \"test\"\n *\n * // Edge / extreme cases\n * extractFileName(\"https://example.com/my%20file%20name.txt\"); // ➔ \"my file name\"\n * extractFileName(\"app.min.js.map\"); // ➔ \"app.min\"\n * extractFileName(\"backup.tar.bak\"); // ➔ \"backup.tar.bak\" (unknown double extension)\n * extractFileName(\"filename.\"); // ➔ \"filename.\"\n * extractFileName(\"a\".repeat(255) + \".txt\"); // ➔ \"a\".repeat(255)\n * ```\n *\n * ----------------------------------------------------------\n * @note\n * - Robust: never throws, handles unusual inputs safely.\n * - Suitable for display, logging, or safe storage.\n * - Normalizes slashes consistently.\n * - Covers nearly all real-world filename, URL, path, data URI, and domain scenarios.\n * - Handles Windows UNC paths, mixed slashes, percent-encoded, Unicode/emoji filenames.\n * - Known multi-part extensions list can be extended without breaking functionality.\n */\nexport const extractFileName = (\n input?: string | null,\n options: ExtractFileNameOptions = {}\n): string | null => {\n if (!isNonEmptyString(input)) return null;\n\n assertIsPlainObject(options, {\n message: ({ currentType, validType }) =>\n `Second parameter (\\`options\\`) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n });\n\n const { domainName, domainAware = false } = options;\n\n assertIsBoolean(domainAware, {\n message: ({ currentType, validType }) =>\n `Parameter \\`domainAware\\` property of the \\`options\\` (second parameter) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n });\n\n let pathname = input.trim();\n\n // Normalize Windows backslashes\n pathname = pathname.replace(/\\\\/g, \"/\");\n\n // domain-aware mode\n if (domainAware) {\n if (!isNonEmptyString(domainName)) {\n throw new TypeError(\n \"If parameter `domainAware` is set to `true`, the option parameter `domainName` is required as string, and cant be an empty-string.\"\n );\n }\n\n const cleanDomain = punycodeUtilsJS\n .toASCII(domainName)\n .replace(/^https?:\\/\\//i, \"\")\n .replace(/^www\\./, \"\")\n .replace(/\\/.*$/, \"\")\n .toLowerCase();\n\n const inputDomain = punycodeUtilsJS\n .toASCII(input)\n .replace(/^https?:\\/\\//i, \"\")\n .replace(/^www\\./, \"\")\n .toLowerCase();\n\n const inputHost = inputDomain.split(\"/\")[0]?.split(/[?#]/)[0];\n const matchesDomain =\n inputHost === cleanDomain || inputHost?.endsWith(`.${cleanDomain}`);\n const hasPath = /\\/[^/]+$/.test(inputDomain);\n\n if (matchesDomain && !hasPath) return null;\n }\n\n // handle special protocol-like strings\n const protocolMatch = pathname.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):(.+)$/);\n if (protocolMatch) {\n const scheme = protocolMatch[1]?.toLowerCase() || \"\";\n const rest = protocolMatch[2];\n\n if ([\"tel\", \"sms\"].some((sch) => sch.startsWith(scheme))) {\n const clean = rest?.split(\"?\")[0]?.split(\"#\")[0];\n return clean?.trim() || null;\n } else if (scheme === \"mailto\") {\n const parts = rest?.split(\"/\");\n let last = parts?.[parts.length - 1];\n last = last?.split(\"?\")[0]?.split(\"#\")[0]; // strip query/hash\n const dotIndex = last?.lastIndexOf(\".\");\n if (dotIndex && dotIndex > 0) last = last?.slice(0, dotIndex);\n return last || null;\n } else if (scheme === \"data\") {\n const commaIndex = rest?.indexOf(\",\") || -1;\n if (commaIndex === -1) return null;\n let payload = rest?.slice(commaIndex + 1);\n payload = payload?.split?.(\"?\")[0]?.split(\"#\")[0]; // strip query/hash\n return payload?.trim() || null;\n }\n }\n\n if (/^[a-z][a-z\\d+\\-.]*:\\/{3,}/i.test(pathname)) {\n // eg https:///file.txt (has more than 2 slash after : protocol)\n pathname = pathname.replace(/^[a-z][a-z\\d+\\-.]*:\\/{2,}/i, \"\");\n } else {\n try {\n const isProbablyUrl = /^[a-z][a-z\\d+\\-.]*:(\\/\\/)?/i.test(pathname);\n\n pathname = isProbablyUrl\n ? new URL(pathname).pathname\n : new URL(`http://localhost/${pathname}`).pathname;\n } catch {\n // Fallback for weird URLs like 'https:///file.txt'\n // Remove protocol + any number of slashes\n pathname = pathname.replace(/^[a-z][a-z\\d+\\-.]*:(\\/\\/)?/i, \"\");\n }\n }\n\n // split into non-empty segments\n const segments = pathname.split(\"/\").filter(Boolean);\n\n if (segments.length === 0) return null;\n\n // Take the last segment as candidate filename\n let lastSegment =\n segments[segments.length - 1]?.split(\"?\")[0]?.split(\"#\")[0] || \"\";\n // Strip trailing ? or # that is alone\n lastSegment = lastSegment?.replace(/[?#]+$/, \"\");\n if (!lastSegment) return null;\n\n // Replace encoded slashes and dots\n lastSegment = lastSegment\n .replace(/%2F/gi, \"/\")\n .replace(/%5C/gi, \"\\\\\")\n .replace(/%2E/gi, \".\");\n\n // If replacement introduces new slashes, take the new last segment\n if (lastSegment.includes(\"/\")) {\n const parts = lastSegment.split(\"/\").filter(Boolean);\n lastSegment = parts[parts.length - 1] || \"\";\n }\n\n let filename = decodeURIComponent(lastSegment);\n\n if (!filename) return null;\n\n // Special filenames always returned as-is (even if trailing slash)\n if (SPECIAL_FILENAMES.has(filename)) return filename;\n\n // Dotfiles like \".env\" should be returned as-is (single leading dot, no other dot)\n if (/^\\.[^.\\s][^/]*$/.test(filename)) return filename;\n\n // If the original pathname ends with \"/\" and the last segment doesn't look like a file\n // const originalEndsWithSlash = pathname.endsWith(\"/\");\n if (!filename.includes(\".\")) return null;\n\n // Strip double extensions first\n const sortedDouble = [...DOUBLE_EXTENSIONS_FILE].sort(\n (a, b) => b.length - a.length\n );\n for (const ext of sortedDouble) {\n const dotExt = `.${ext.toLowerCase()}`;\n if (filename.toLowerCase().endsWith(dotExt)) {\n filename = filename.slice(0, filename.length - dotExt.length);\n break;\n }\n }\n\n // Strip single extensions\n const sortedSingle = [...EXTENSIONS_FILE].sort((a, b) => b.length - a.length);\n for (const ext of sortedSingle) {\n const dotExt = `.${ext.toLowerCase()}`;\n if (filename.toLowerCase().endsWith(dotExt)) {\n filename = filename.slice(0, filename.length - dotExt.length);\n break;\n }\n }\n\n return filename || null;\n};\n"],"mappings":";;;;;;;;;;;;;;AAGA,MAAa,kBAAkB,IAAI,IAAI;CAErC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAKF,MAAa,yBAAyB,IAAI,IAAI;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAKF,MAAa,oBAAoB,IAAI,IAAI;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;EAC7B,MAAM,QAAQ,YAAY,MAAM,IAAI,CAAC,OAAO,QAAQ;EACpD,cAAc,MAAM,MAAM,SAAS,MAAM;;CAG3C,IAAI,WAAW,mBAAmB,YAAY;CAE9C,IAAI,CAAC,UAAU,OAAO;CAGtB,IAAI,kBAAkB,IAAI,SAAS,EAAE,OAAO;CAG5C,IAAI,kBAAkB,KAAK,SAAS,EAAE,OAAO;CAI7C,IAAI,CAAC,SAAS,SAAS,IAAI,EAAE,OAAO;CAGpC,MAAM,eAAe,CAAC,GAAG,uBAAuB,CAAC,MAC9C,GAAG,MAAM,EAAE,SAAS,EAAE,OACxB;CACD,KAAK,MAAM,OAAO,cAAc;EAC9B,MAAM,SAAS,IAAI,IAAI,aAAa;EACpC,IAAI,SAAS,aAAa,CAAC,SAAS,OAAO,EAAE;GAC3C,WAAW,SAAS,MAAM,GAAG,SAAS,SAAS,OAAO,OAAO;GAC7D;;;CAKJ,MAAM,eAAe,CAAC,GAAG,gBAAgB,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO;CAC7E,KAAK,MAAM,OAAO,cAAc;EAC9B,MAAM,SAAS,IAAI,IAAI,aAAa;EACpC,IAAI,SAAS,aAAa,CAAC,SAAS,OAAO,EAAE;GAC3C,WAAW,SAAS,MAAM,GAAG,SAAS,SAAS,OAAO,OAAO;GAC7D;;;CAIJ,OAAO,YAAY"}
|
|
1
|
+
{"version":3,"file":"parsers-Dl9fFra4.js","names":[],"sources":["../src/parsers/_private/extensions.ts","../src/parsers/extractFileName.ts"],"sourcesContent":["// ==========================\n// Single extensions\n// ==========================\nexport const EXTENSIONS_FILE = new Set([\n // 📄 Text & Document\n \"txt\",\n \"md\",\n \"rtf\",\n \"tex\",\n \"doc\",\n \"docx\",\n \"odt\",\n \"ott\",\n \"pdf\",\n \"djvu\",\n \"epub\",\n \"fb2\",\n \"lit\",\n \"lrf\",\n \"xls\",\n \"xlsx\",\n \"ods\",\n \"csv\",\n \"tsv\",\n \"ppt\",\n \"pptx\",\n \"pps\",\n \"bib\",\n \"cba\",\n \"cbt\",\n \"cbz\",\n \"cbr\",\n \"opds\",\n \"fodt\",\n \"pages\",\n \"rtfd\",\n \"sxc\",\n \"sxw\",\n \"wpd\",\n \"xps\",\n \"dotx\",\n \"dotm\",\n \"xltx\",\n \"xltm\",\n \"sldx\",\n \"sldm\",\n \"fods\",\n \"mdx\",\n \"markdown\",\n \"texi\",\n \"textile\",\n\n // 🖼️ Image\n \"jpg\",\n \"jpeg\",\n \"png\",\n \"gif\",\n \"bmp\",\n \"tif\",\n \"tiff\",\n \"webp\",\n \"svg\",\n \"ico\",\n \"heif\",\n \"heic\",\n \"raw\",\n \"cr2\",\n \"nef\",\n \"orf\",\n \"sr2\",\n \"dng\",\n \"dds\",\n \"psd\",\n \"exr\",\n \"xcf\",\n \"ai\",\n \"eps\",\n \"cdr\",\n \"indd\",\n \"pcx\",\n \"pgm\",\n \"ppm\",\n \"pbm\",\n \"pnm\",\n \"jfif\",\n \"ras\",\n \"tga\",\n \"j2k\",\n \"jp2\",\n \"emf\",\n \"wmf\",\n \"hdp\",\n \"mdi\",\n \"hevc\",\n\n // 🎵 Audio\n \"mp3\",\n \"wav\",\n \"ogg\",\n \"flac\",\n \"aac\",\n \"m4a\",\n \"wma\",\n \"alac\",\n \"aiff\",\n \"aif\",\n \"amr\",\n \"mid\",\n \"midi\",\n \"opus\",\n \"au\",\n \"caf\",\n \"ape\",\n \"mka\",\n \"spx\",\n \"ra\",\n \"ram\",\n \"mpc\",\n \"wv\",\n \"aifc\",\n \"mod\",\n \"it\",\n \"s3m\",\n \"xm\",\n \"kar\",\n \"m4b\",\n \"voc\",\n \"snd\",\n \"a52\",\n \"ac3\",\n \"dts\",\n\n // 🎥 Video\n \"mp4\",\n \"mkv\",\n \"avi\",\n \"mov\",\n \"wmv\",\n \"webm\",\n \"mpeg\",\n \"mpg\",\n \"3gp\",\n \"3g2\",\n \"m4v\",\n \"ts\",\n \"mts\",\n \"asf\",\n \"rm\",\n \"rmvb\",\n \"vob\",\n \"f4v\",\n \"ogv\",\n \"m2ts\",\n \"dav\",\n \"mxf\",\n \"mjpeg\",\n \"flv\",\n \"divx\",\n \"f4a\",\n \"f4p\",\n \"m2v\",\n \"ogm\",\n \"vp8\",\n \"vp9\",\n \"xvid\",\n \"yuv\",\n \"mng\",\n \"dv\",\n \"m1v\",\n \"roq\",\n \"m2t\",\n \"av1\",\n \"hevc\",\n \"m3u\",\n \"m3u8\",\n\n // 🗃️ Archive & Compression\n \"zip\",\n \"rar\",\n \"7z\",\n \"tar\",\n \"gz\",\n \"bz\",\n \"bz2\",\n \"xz\",\n \"tgz\",\n \"tbz2\",\n \"txz\",\n \"lz\",\n \"lzma\",\n \"z\",\n \"cab\",\n \"arj\",\n \"ace\",\n \"rpm\",\n \"deb\",\n \"pkg\",\n \"apk\",\n \"jar\",\n \"war\",\n \"ear\",\n \"sit\",\n \"sitx\",\n \"cpgz\",\n \"tlz\",\n \"tlzma\",\n \"tzo\",\n \"cpio\",\n \"shar\",\n \"bzip\",\n \"gzip\",\n \"7zip\",\n \"rar5\",\n \"tbz\",\n \"txz\",\n\n // 💾 Disk Image\n \"iso\",\n \"img\",\n \"vhd\",\n \"vmdk\",\n \"qcow2\",\n \"vhdx\",\n \"bin\",\n \"cue\",\n \"nrg\",\n \"daa\",\n \"sdi\",\n \"vfd\",\n \"ima\",\n \"dmg\",\n \"vdi\",\n \"toast\",\n \"ccd\",\n \"mdf\",\n \"cdi\",\n \"bif\",\n \"bifc\",\n \"bifd\",\n\n // 🗃️ Database & Data\n \"sql\",\n \"db\",\n \"dbf\",\n \"mdb\",\n \"accdb\",\n \"json\",\n \"toml\",\n \"ini\",\n \"log\",\n \"plist\",\n \"pkl\",\n \"msgpack\",\n \"h5\",\n \"hdf5\",\n \"parquet\",\n \"avro\",\n \"orc\",\n \"ndjson\",\n \"pdb\",\n \"sqlite\",\n \"sqlite3\",\n \"dbx\",\n \"sdf\",\n \"nc\",\n \"netcdf\",\n \"grib\",\n \"geojson\",\n \"gml\",\n \"hjson\",\n \"cdb\",\n \"db3\",\n \"dta\",\n \"sav\",\n \"sas7bdat\",\n \"ldif\",\n \"fdb\",\n \"gdb\",\n \"sqlite2\",\n \"h5ad\",\n \"nc4\",\n \"xmind\",\n \"drawio\",\n \"sdc\",\n \"jsonl\",\n \"yaml\",\n \"yml\",\n \"toml\",\n\n // 💻 Code & Script\n \"js\",\n \"jsx\",\n \"ts\",\n \"tsx\",\n \"c\",\n \"cpp\",\n \"net\",\n \"h\",\n \"hpp\",\n \"java\",\n \"py\",\n \"rb\",\n \"go\",\n \"rs\",\n \"php\",\n \"pl\",\n \"sh\",\n \"bat\",\n \"cmd\",\n \"ps1\",\n \"lua\",\n \"swift\",\n \"kt\",\n \"scala\",\n \"cs\",\n \"vb\",\n \"dart\",\n \"m\",\n \"r\",\n \"jl\",\n \"fs\",\n \"vbproj\",\n \"sln\",\n \"pri\",\n \"gemspec\",\n \"gradle\",\n \"coffee\",\n \"erl\",\n \"ex\",\n \"exs\",\n \"hs\",\n \"lisp\",\n \"clj\",\n \"groovy\",\n \"scm\",\n \"vbs\",\n \"nim\",\n \"rkt\",\n \"ml\",\n \"mli\",\n \"fsx\",\n \"psm1\",\n \"cbl\",\n \"for\",\n \"f90\",\n \"lock\",\n \"tsconfig\",\n \"vue\",\n \"svelte\",\n \"cjs\",\n \"mjs\",\n \"mts\",\n \"cts\",\n \"json5\",\n \"es6\",\n \"module\",\n \"systemjs\",\n\n // 🌐 Web & Config\n \"html\",\n \"htm\",\n \"xhtml\",\n \"css\",\n \"scss\",\n \"sass\",\n \"less\",\n \"xml\",\n \"xlf\",\n \"po\",\n \"pot\",\n \"jsp\",\n \"asp\",\n \"aspx\",\n \"jspf\",\n \"cgi\",\n \"cfm\",\n \"env\",\n \"babelrc\",\n \"cfg\",\n \"config\",\n \"conf\",\n \"editorconfig\",\n \"eslintrc\",\n \"gitconfig\",\n \"gitattributes\",\n \"gitignore\",\n \"prettierrc\",\n \"webmanifest\",\n \"dockerfile\",\n // \".dockerfile\",\n\n // 🔠 Font\n \"ttf\",\n \"otf\",\n \"woff\",\n \"woff2\",\n \"eot\",\n \"dfont\",\n \"pfa\",\n \"pfb\",\n \"fon\",\n \"fnt\",\n \"bdf\",\n \"ps\",\n\n // 🗺️ CAD & GIS\n \"dwg\",\n \"dxf\",\n \"shp\",\n \"kml\",\n \"kmz\",\n \"gpx\",\n \"stl\",\n \"step\",\n \"iges\",\n \"igs\",\n \"3ds\",\n \"3dm\",\n \"fbx\",\n \"obj\",\n \"dae\",\n \"ifc\",\n\n // 🔧 System / Binary / Execution\n \"exe\",\n \"msi\",\n \"run\",\n \"com\",\n \"app\",\n \"elf\",\n \"dll\",\n \"so\",\n \"dylib\",\n \"sys\",\n \"scr\",\n \"bin\",\n \"out\",\n\n // 🔐 Certificates / Crypto\n \"pem\",\n \"crt\",\n \"cer\",\n \"der\",\n \"csr\",\n \"p12\",\n \"pfx\",\n \"jks\",\n \"asc\",\n \"gpg\",\n \"pgp\",\n \"p7b\",\n \"p7c\",\n \"spc\",\n \"key\",\n \"pub\",\n \"cert\",\n \"p7m\",\n\n // 🎮 Games & Projects\n \"nes\",\n \"sfc\",\n \"gba\",\n \"nds\",\n \"rom\",\n \"pak\",\n \"vpk\",\n \"bik\",\n \"cso\",\n \"wad\",\n \"wadx\",\n \"smc\",\n \"gb\",\n \"gbc\",\n\n // 🔬 Bioinformatics\n \"fasta\",\n \"fa\",\n \"fas\",\n \"ffn\",\n \"faa\",\n \"fna\",\n \"frn\",\n \"fastq\",\n \"fq\",\n \"bam\",\n \"bed\",\n \"sam\",\n \"vcf\",\n \"gff\",\n \"gff3\",\n \"gtf\",\n \"fai\",\n \"tbi\",\n \"fast5\",\n \"fqz\",\n \"fq5\"\n]);\n\n// ==========================\n// Double extensions\n// ==========================\nexport const DOUBLE_EXTENSIONS_FILE = new Set([\n \"log.gz\",\n \"tar.gz\",\n \"tar.bz2\",\n \"tar.bz\",\n \"tar.xz\",\n \"tar.lz\",\n \"tar.lzma\",\n \"tar.Z\",\n \"tar.zst\",\n \"tar.lz4\",\n \"log.gz\",\n \"sql.gz\",\n \"csv.gz\",\n \"tsv.gz\",\n \"json.gz\",\n \"ndjson.gz\",\n \"fq.gz\",\n \"sam.gz\",\n \"fasta.gz\",\n \"fa.gz\",\n \"ffn.gz\",\n \"faa.gz\",\n \"fna.gz\",\n \"frn.gz\",\n \"fastq.gz\",\n \"js.map\",\n \"css.map\"\n]);\n\n// ==========================\n// Special filenames\n// ==========================\nexport const SPECIAL_FILENAMES = new Set([\n \"Makefile\",\n \"Dockerfile\",\n \".dockerignore\",\n \".npmrc\",\n \".envrc\",\n \".htgroup\",\n \".eslintignore\",\n \".env.test\",\n \".env.local\",\n \".env.production\",\n \".env.development\",\n \".env.example\",\n \".dockerfile\",\n \".htaccess\",\n \".htpasswd\",\n \".babelrc\",\n \".eslintrc\",\n \".editorconfig\",\n \".prettierignore\",\n \"docker-compose.override.yml\",\n \"docker-compose.yml\",\n \"Vagrantfile\",\n \"Procfile\",\n \"Gemfile\",\n \"Rakefile\",\n \"package.json\",\n \"package-lock.json\",\n \"yarn.lock\",\n \"pnpm-lock.yaml\",\n \"tsconfig.json\",\n \"webpack.config.js\",\n \"vite.config.js\",\n \"vite.config.ts\",\n \"Gruntfile.js\",\n \"gulpfile.js\",\n \"babel.config.js\",\n \"babel.js\",\n \"rollup.js\",\n\n // SPECIAL PRESERVE NAME\n \"CON\",\n \"NUL\",\n \"PRN\",\n \"AUX\",\n \"COM1\",\n \"COM2\",\n \"COM3\",\n \"COM4\",\n \"COM5\",\n \"COM6\",\n \"COM7\",\n \"COM8\",\n \"COM9\",\n \"LPT1\",\n \"LPT2\",\n \"LPT3\",\n \"LPT4\",\n \"LPT5\",\n \"LPT6\",\n \"LPT7\",\n \"LPT8\",\n \"LPT9\"\n]);\n","import { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\nimport {\n DOUBLE_EXTENSIONS_FILE,\n EXTENSIONS_FILE,\n SPECIAL_FILENAMES\n} from \"./_private/extensions\";\n\nimport { punycodeUtilsJS } from \"@/urls/utils/punyCode\";\n\nimport { assertIsBoolean } from \"@/assertions/booleans/assertIsBoolean\";\nimport { assertIsPlainObject } from \"@/assertions/objects/assertIsPlainObject\";\n\nexport type ExtractFileNameOptions = {\n /** ----------------------------------------------------------\n * * ***Indicates whether the input should be treated as a potential domain string.***\n * ----------------------------------------------------------\n *\n * - Behavior when `true`:\n * - The `domainName` option is required and must be a string and non-empty string.\n * If `domainName` is `undefined`, `null`, or an empty string, a `TypeError` will be thrown.\n * - The `domainName` is used to determine if the input is a domain-only string.\n * - Returns `null` if the input exactly matches `domainName` or any of its subdomains **and** has no additional path or filename.\n * - If the input does not match `domainName` or its subdomains, it will be processed as a regular file-like name.\n * - Supports **Unicode/IDN domains** (e.g., `tést-ドメイン.com`) and **ASCII filenames**, mixed safely.\n *\n * @default false\n */\n domainAware?: boolean;\n\n /** ----------------------------------------------------------\n * * ***The base domain name used for comparison (e.g., `\"example.com\"`).***\n * ----------------------------------------------------------\n *\n * - Required when `domainAware` is `true`.\n * - Helps differentiate between a domain-only input (ignored) and a standalone file-like string (processed normally).\n * - Must be a string and non-empty string. Invalid values (`undefined`, `null`, or empty string) will trigger a `TypeError`.\n * - Works with both **ASCII domains** and **Unicode/IDN domains**.\n * - Example:\n * ```ts *\n * // ASCII domain + ASCII filename\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"resume\"\n * extractFileName(\"example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null (because input is treated as domain-name)\n *\n * // Unicode domain + ASCII filename\n * extractFileName(\"tést-ドメイン.com/file.txt\", {\n * domainAware: true,\n * domainName: \"ドメイン.com\"\n * });\n * // ➔ \"file\"\n *\n * // Unicode domain + Unicode filename\n * extractFileName(\"tést-ドメイン.com/ファイル名.pdf\", {\n * domainAware: true,\n * domainName: \"ドメイン.com\"\n * });\n * // ➔ \"ファイル名\"\n *\n * // Invalid domainName, will throw TypeError\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"\"\n * });\n * // ➔ TypeError\n * ```\n *\n * @default undefined\n */\n domainName?: string;\n};\n\n/** ----------------------------------------------------------\n * * ***Utility: `extractFileName`.***\n * ----------------------------------------------------------\n *\n * **Extracts the **clean base filename** from nearly any input string, including URLs, local file paths,\n * UNC paths, and plain filenames.**\n *\n * - It automatically safely handles extracts the **base file name** (without extension) from:\n * - File system paths (Windows, Unix, UNC)\n * - Protocols like http, https, ftp, file, mailto, or custom schemes\n * - Percent-encoded, Unicode, and emoji characters\n * - Dotfiles, reserved OS names, multi-part extensions\n * - Data URIs\n * - Optional domain-aware mode to ignore domain-only inputs\n * - Plain filenames\n *\n * - Full support for:\n * - Unicode, emoji, percent-encoding\n * - Dotfiles (e.g., `.env`, `.gitignore`)\n * - Reserved/OS-protected filenames:\n * `CON`, `PRN`, `AUX`, `NUL`, `COM1`–`COM9`, `LPT1`–`LPT9`\n * - Known multi-part extensions:\n * `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.lz`, `.tar.zst`, `.min.js`, `.js.map`, `.log.gz`, `.sql.gz`,\n * `.backup.tar`, etc.\n * - Data URIs (`data:[mime];base64,...` ➔ payload string)\n * - Domain-aware mode (optional)\n *\n * ----------------------------------------------------------\n * - **Behavior / Features**\n * - Strips **known extensions**, including multi-part and common double/triple extensions.\n * - Leaves unknown/custom extensions intact.\n * - Preserves **dotfiles** as-is (leading dot preserved).\n * - Returns `null` if:\n * - input is `null`, `undefined`, or not a string\n * - input is empty, whitespace-only, or only slashes\n * - input represents a folder path (trailing slash/backslash, drive/folder only)\n * - input is a **domain-only string** in domain-aware mode\n * - Normalizes Windows-style backslashes (`\\`) internally as `/`.\n * - Supports UNC paths, mixed slashes, and Windows drive letters safely.\n * - Handles URLs:\n * - Ignores query strings (`?v=1.2.3`) and hash fragments (`#section`)\n * - Decodes percent-encoded filenames (`my%20file.txt` ➔ `my file.txt`)\n * - Supports protocol-relative URLs (`//cdn.example.com/file.jpg`)\n * - Supports uncommon/custom protocols (`ftp://`, `file://`, `mailto:`, etc.)\n * - Handles **multiple dots**, **trailing dots**, **triple or more extensions**\n * - Supports filenames on mixed Unicode/ASCII domains:\n * - Domain names can include Unicode characters (IDN / punycode)\n * - Filenames may contain ASCII, Unicode, and emoji characters\n * - Works correctly when domain is Unicode and filename is ASCII, or vice versa\n * - Supports extremely long filenames safely (up to OS limits)\n * - Domain-aware mode (`domainAware: true` + `domainName`):\n * - Parameter `domainName` must be a string and non-empty string; otherwise a TypeError is thrown.\n * - Returns `null` if input equals `domainName` or any subdomain with no file path\n * - Extracts filename normally if path/file exists on domain or other domain\n * - Safe in Node.js and browsers\n *\n * ----------------------------------------------------------\n * @param {string | null | undefined} input\n * URL, file path, or plain filename to extract from.\n *\n * @param {ExtractFileNameOptions} [options]\n * Optional configuration:\n * - `domainAware?: boolean` – treat input as a domain string. Requires `domainName` to be a string and non-empty string; otherwise, a TypeError is thrown.\n * - `domainName?: string` – base domain for comparison eg (`example.com`), required when `domainAware` is true.\n *\n * @returns {string | null}\n * - Base filename without known extensions\n * - Original filename if extension unknown\n * - `null` for invalid inputs, folder paths, or domain-only strings\n *\n * ----------------------------------------------------------\n * @example\n * ```ts\n * // Basic files\n * extractFileName(\"document.pdf\"); // ➔ \"document\"\n * extractFileName(\"/files/archive.tar.gz\"); // ➔ \"archive\"\n * extractFileName(\"C:\\\\path\\\\file.txt\"); // ➔ \"file\"\n * extractFileName(\".env\"); // ➔ \".env\"\n * extractFileName(\"folder/\"); // ➔ null\n *\n * // Not a file\n * extractFileName(\"not-file\"); // ➔ null\n * extractFileName(\"not-file/\"); // ➔ null\n * extractFileName(\"/not-file/\"); // ➔ null\n * extractFileName(\"/not-file\"); // ➔ null\n *\n * // URLs with queries, hashes, protocols\n * extractFileName(\"https://example.com/file.txt?ver=1\"); // ➔ \"file\"\n * extractFileName(\"https://example.com/archive.tar.gz#part\"); // ➔ \"archive\"\n * extractFileName(\"//cdn.example.com/image.png\"); // ➔ \"image\"\n *\n *\n * // Special protocol handling\n * extractFileName(\"tel:+6212345678\"); // ➔ \"+6212345678\"\n * extractFileName(\"sms:+6212345678\"); // ➔ \"+6212345678\"\n * extractFileName(\"mailto:user@domain.com\"); // ➔ \"user@domain\"\n * extractFileName(\"data:text/plain;base64,SGVsbG8=\"); // ➔ \"SGVsbG8=\"\n * extractFileName(\"mailto:resume.com\"); // ➔ \"resume\"\n * extractFileName(\"ftp://example.com/image.jpeg\"); // ➔ \"image\"\n * extractFileName(\"ftp://files.example.com/app.min.js\"); // ➔ \"app.min\"\n * extractFileName(\"file:///C:/path/to/document.pdf\"); // ➔ \"document\"\n * extractFileName(\"custom-scheme://example.com/video.mp4\"); // ➔ \"video\"\n *\n * // Unicode & emoji\n * extractFileName(\"emoji-😊.png\"); // ➔ \"emoji-😊\"\n * extractFileName(\"🔥project.tar.gz\"); // ➔ \"🔥project\"\n *\n * // Dotfiles\n * extractFileName(\".gitignore\"); // ➔ \".gitignore\"\n * extractFileName(\"/path/.bashrc\"); // ➔ \".bashrc\"\n *\n * // Mixed Unicode domain and ASCII filename\n * extractFileName(\"https://tést-ドメイン.com/file.txt\"); // ➔ \"file\"\n * extractFileName(\"https://example.com/ファイル名.pdf\"); // ➔ \"ファイル名\"\n * extractFileName(\"https://ドメイン例.com/emoji-🔥.png\"); // ➔ \"emoji-🔥\"\n *\n * // Reserved filenames\n * extractFileName(\"CON\"); // ➔ \"CON\"\n * extractFileName(\"NUL.txt\"); // ➔ \"NUL\"\n *\n * // Domain-aware mode\n * extractFileName(\"example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null\n * extractFileName(\"cdn.example.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ null\n * extractFileName(\"resume.com\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"resume\"\n * extractFileName(\"https://example.com/file.txt\", {\n * domainAware: true,\n * domainName: \"example.com\"\n * });\n * // ➔ \"file\"\n *\n * // Windows & UNC paths\n * extractFileName(\"C:\\\\Users\\\\rzl\\\\Documents\\\\file.txt\"); // ➔ \"file\"\n * extractFileName(\"\\\\\\\\SERVER\\\\share\\\\logs\\\\output.log\"); // ➔ \"output\"\n * extractFileName(\"C:/Users\\\\rzl/mix\\\\test.pdf\"); // ➔ \"test\"\n *\n * // Edge / extreme cases\n * extractFileName(\"https://example.com/my%20file%20name.txt\"); // ➔ \"my file name\"\n * extractFileName(\"app.min.js.map\"); // ➔ \"app.min\"\n * extractFileName(\"backup.tar.bak\"); // ➔ \"backup.tar.bak\" (unknown double extension)\n * extractFileName(\"filename.\"); // ➔ \"filename.\"\n * extractFileName(\"a\".repeat(255) + \".txt\"); // ➔ \"a\".repeat(255)\n * ```\n *\n * ----------------------------------------------------------\n * @note\n * - Robust: never throws, handles unusual inputs safely.\n * - Suitable for display, logging, or safe storage.\n * - Normalizes slashes consistently.\n * - Covers nearly all real-world filename, URL, path, data URI, and domain scenarios.\n * - Handles Windows UNC paths, mixed slashes, percent-encoded, Unicode/emoji filenames.\n * - Known multi-part extensions list can be extended without breaking functionality.\n */\nexport const extractFileName = (\n input?: string | null,\n options: ExtractFileNameOptions = {}\n): string | null => {\n if (!isNonEmptyString(input)) return null;\n\n assertIsPlainObject(options, {\n message: ({ currentType, validType }) =>\n `Second parameter (\\`options\\`) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n });\n\n const { domainName, domainAware = false } = options;\n\n assertIsBoolean(domainAware, {\n message: ({ currentType, validType }) =>\n `Parameter \\`domainAware\\` property of the \\`options\\` (second parameter) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n });\n\n let pathname = input.trim();\n\n // Normalize Windows backslashes\n pathname = pathname.replace(/\\\\/g, \"/\");\n\n // domain-aware mode\n if (domainAware) {\n if (!isNonEmptyString(domainName)) {\n throw new TypeError(\n \"If parameter `domainAware` is set to `true`, the option parameter `domainName` is required as string, and cant be an empty-string.\"\n );\n }\n\n const cleanDomain = punycodeUtilsJS\n .toASCII(domainName)\n .replace(/^https?:\\/\\//i, \"\")\n .replace(/^www\\./, \"\")\n .replace(/\\/.*$/, \"\")\n .toLowerCase();\n\n const inputDomain = punycodeUtilsJS\n .toASCII(input)\n .replace(/^https?:\\/\\//i, \"\")\n .replace(/^www\\./, \"\")\n .toLowerCase();\n\n const inputHost = inputDomain.split(\"/\")[0]?.split(/[?#]/)[0];\n const matchesDomain =\n inputHost === cleanDomain || inputHost?.endsWith(`.${cleanDomain}`);\n const hasPath = /\\/[^/]+$/.test(inputDomain);\n\n if (matchesDomain && !hasPath) return null;\n }\n\n // handle special protocol-like strings\n const protocolMatch = pathname.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):(.+)$/);\n if (protocolMatch) {\n const scheme = protocolMatch[1]?.toLowerCase() || \"\";\n const rest = protocolMatch[2];\n\n if ([\"tel\", \"sms\"].some((sch) => sch.startsWith(scheme))) {\n const clean = rest?.split(\"?\")[0]?.split(\"#\")[0];\n return clean?.trim() || null;\n } else if (scheme === \"mailto\") {\n const parts = rest?.split(\"/\");\n let last = parts?.[parts.length - 1];\n last = last?.split(\"?\")[0]?.split(\"#\")[0]; // strip query/hash\n const dotIndex = last?.lastIndexOf(\".\");\n if (dotIndex && dotIndex > 0) last = last?.slice(0, dotIndex);\n return last || null;\n } else if (scheme === \"data\") {\n const commaIndex = rest?.indexOf(\",\") || -1;\n if (commaIndex === -1) return null;\n let payload = rest?.slice(commaIndex + 1);\n payload = payload?.split?.(\"?\")[0]?.split(\"#\")[0]; // strip query/hash\n return payload?.trim() || null;\n }\n }\n\n if (/^[a-z][a-z\\d+\\-.]*:\\/{3,}/i.test(pathname)) {\n // eg https:///file.txt (has more than 2 slash after : protocol)\n pathname = pathname.replace(/^[a-z][a-z\\d+\\-.]*:\\/{2,}/i, \"\");\n } else {\n try {\n const isProbablyUrl = /^[a-z][a-z\\d+\\-.]*:(\\/\\/)?/i.test(pathname);\n\n pathname = isProbablyUrl\n ? new URL(pathname).pathname\n : new URL(`http://localhost/${pathname}`).pathname;\n } catch {\n // Fallback for weird URLs like 'https:///file.txt'\n // Remove protocol + any number of slashes\n pathname = pathname.replace(/^[a-z][a-z\\d+\\-.]*:(\\/\\/)?/i, \"\");\n }\n }\n\n // split into non-empty segments\n const segments = pathname.split(\"/\").filter(Boolean);\n\n if (segments.length === 0) return null;\n\n // Take the last segment as candidate filename\n let lastSegment =\n segments[segments.length - 1]?.split(\"?\")[0]?.split(\"#\")[0] || \"\";\n // Strip trailing ? or # that is alone\n lastSegment = lastSegment?.replace(/[?#]+$/, \"\");\n if (!lastSegment) return null;\n\n // Replace encoded slashes and dots\n lastSegment = lastSegment\n .replace(/%2F/gi, \"/\")\n .replace(/%5C/gi, \"\\\\\")\n .replace(/%2E/gi, \".\");\n\n // If replacement introduces new slashes, take the new last segment\n if (lastSegment.includes(\"/\")) {\n const parts = lastSegment.split(\"/\").filter(Boolean);\n lastSegment = parts[parts.length - 1] || \"\";\n }\n\n let filename = decodeURIComponent(lastSegment);\n\n if (!filename) return null;\n\n // Special filenames always returned as-is (even if trailing slash)\n if (SPECIAL_FILENAMES.has(filename)) return filename;\n\n // Dotfiles like \".env\" should be returned as-is (single leading dot, no other dot)\n if (/^\\.[^.\\s][^/]*$/.test(filename)) return filename;\n\n // If the original pathname ends with \"/\" and the last segment doesn't look like a file\n // const originalEndsWithSlash = pathname.endsWith(\"/\");\n if (!filename.includes(\".\")) return null;\n\n // Strip double extensions first\n const sortedDouble = [...DOUBLE_EXTENSIONS_FILE].sort(\n (a, b) => b.length - a.length\n );\n for (const ext of sortedDouble) {\n const dotExt = `.${ext.toLowerCase()}`;\n if (filename.toLowerCase().endsWith(dotExt)) {\n filename = filename.slice(0, filename.length - dotExt.length);\n break;\n }\n }\n\n // Strip single extensions\n const sortedSingle = [...EXTENSIONS_FILE].sort((a, b) => b.length - a.length);\n for (const ext of sortedSingle) {\n const dotExt = `.${ext.toLowerCase()}`;\n if (filename.toLowerCase().endsWith(dotExt)) {\n filename = filename.slice(0, filename.length - dotExt.length);\n break;\n }\n }\n\n return filename || null;\n};\n"],"mappings":";;;;;;;;;;;;;;AAGA,MAAa,kBAAkB,IAAI,IAAI;CAErC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAKF,MAAa,yBAAyB,IAAI,IA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S,IAAI,IAAI,aAAa;EACpC,IAAI,SAAS,aAAa,CAAC,SAAS,OAAO,EAAE;GAC3C,WAAW,SAAS,MAAM,GAAG,SAAS,SAAS,OAAO,OAAO;GAC7D;;;CAIJ,OAAO,YAAY"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
|
-
import { y as isNonEmptyString } from "./assertIsBoolean-
|
|
10
|
+
import { y as isNonEmptyString } from "./assertIsBoolean-9-huIcIR.js";
|
|
11
11
|
const parseCurrencyString = (input) => {
|
|
12
12
|
if (!isNonEmptyString(input)) return 0;
|
|
13
13
|
let trimmed = input.trim().replace(/\u00A0/g, "").replace(/\u202F/g, "");
|
|
@@ -47,4 +47,4 @@ const parseCurrencyString = (input) => {
|
|
|
47
47
|
return isNegative ? -num : num;
|
|
48
48
|
};
|
|
49
49
|
export { parseCurrencyString as t };
|
|
50
|
-
//# sourceMappingURL=parsing-
|
|
50
|
+
//# sourceMappingURL=parsing-BG73HUrI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsing-
|
|
1
|
+
{"version":3,"file":"parsing-BG73HUrI.js","names":[],"sources":["../src/conversions/currency/parsing.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** -------------------------------------------------------------\n * * ***Utility: `parseCurrencyString`.***\n * ---------------------------------------------\n * **Parses a human-friendly currency string into a JavaScript number.**\n * - **Supports multi-locale formats:**\n * - ***US:*** `\"15,000.10\"` ➔ `15300.10`.\n * - ***Swiss:*** `\"15'000.10\"` ➔ `15300.10`.\n * - ***French:*** `\"15 000,10\"` ➔ `15300.10`.\n * - ***Indian:*** `\"1,23,456.78\"` ➔ `123456.78`.\n * - ***European:*** `\"151.000,10\"` ➔ `151300.10`.\n * - ***Compact:*** `\"15300000,10\"` ➔ `15300000.10`.\n * - **Features:**\n * - Strips symbols automatically: `\"Rp\"`, `\"$\"`, `\"EUR\"`, `etc`.\n * - Handles bracket negatives: `\"(15.000,10)\"` ➔ `-15300.10`.\n * - Normalizes decimal separator (last dot or comma).\n * - Detects non-breaking spaces (`\\u00A0`, `\\u202F`) often in European data.\n * - Fallback to `0` for empty, invalid, or non-numeric strings.\n * - **How it parses internally:**\n * 1. Removes all characters except digits, `.`, `,`, `'`, `space`,\n * `\\u00A0`, `\\u202F`.\n * 2. Detects bracket (...) as negative.\n * 3. If Indian style (`1,23,456`) detected by multiple ,`\\d{2}`, removes all commas.\n * 4. Otherwise:\n * - If multiple dots & no commas ➔ thousands: removes all `.`.\n * - If multiple commas & no dots ➔ thousands: removes all `,`.\n * - If mixed, treats last `,` or `.` as decimal.\n * 5. Converts final decimal to `.` for JS float.\n * - **Gotchas:**\n * - If both `.` and `,` are present, last occurrence is used as decimal.\n * - For strings like `\"1.121.234,56\"` ➔ decimal is `,`.\n * - For `\"1,121,234.56\"` ➔ decimal is `.`.\n * - For `\"15300000,2121\"` ➔ decimal becomes `.` internally.\n * - **ℹ️ Note:**\n * - You can use this function as a first step to **sanitize currency inputs**\n * before storing into database or doing math.\n * - Always pair this with your formatter for consistent output display.\n * @param {string|null|undefined} input\n * ***Any messy currency string, may contain:***\n * * Currency symbols (`Rp`,`$`, `CHF`, `EUR`).\n * * Thousands separators (`.`, `,`, `'`, `space`, `\\u00A0`, `\\u202F`).\n * * Various decimal formats (`,` or `.`).\n * * Bracket negative: `\"(15.000,10)\"`.\n * @returns {number} JavaScript float representation, will return `0` for invalid, empty, or non-string input.\n * @example\n * ```ts\n * parseCurrencyString(\"Rp 15.300.000,21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"15 300 000,21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"CHF 15'300'000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"$15,300,000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"(15.000,10)\");\n * // ➔ -15000.10\n * parseCurrencyString(\"1,23,456.78\");\n * // ➔ 123456.78\n * parseCurrencyString(\"15300000,2121\");\n * // ➔ 15300000.2121\n * parseCurrencyString(\"USD 15 300 000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"\");\n * // ➔ 0\n * parseCurrencyString(\"abc\");\n * // ➔ 0\n * ```\n */\nexport const parseCurrencyString = (\n input: string | null | undefined\n): number => {\n if (!isNonEmptyString(input)) return 0;\n\n let trimmed = input\n .trim()\n .replace(/\\u00A0/g, \"\")\n .replace(/\\u202F/g, \"\");\n\n // detect brackets (accounting style)\n let isNegative = false;\n if (/^\\(.*\\)$/.test(trimmed)) {\n isNegative = true;\n trimmed = trimmed.slice(1, -1).trim();\n }\n\n trimmed = trimmed\n .replace(/^[-\\s]+/, (match) => (match.includes(\"-\") ? \"-\" : \"\"))\n .replace(/[\\s.,-]+$/, \"\");\n\n isNegative = isNegative || /^-/.test(trimmed) || /^[^\\d]*-/.test(trimmed);\n const cleaned = trimmed.replace(/[^0-9.,'\\s]/g, \"\");\n let cleanedNoSpace = cleaned.replace(/[\\s']/g, \"\");\n\n // detect Indian style (like 1,23,456)\n const indianMatches = cleanedNoSpace.match(/,\\d{2}/g);\n const isIndianStyle = indianMatches && indianMatches.length > 1;\n if (isIndianStyle) {\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n const dotCount = (cleanedNoSpace.match(/\\./g) || []).length;\n const commaCount = (cleanedNoSpace.match(/,/g) || []).length;\n\n if (dotCount > 1 && commaCount === 0) {\n // e.g. \"1.121.234\"\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\");\n } else if (commaCount > 1 && dotCount === 0) {\n // e.g. \"1,121,234\"\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n // mixed, or single\n const lastComma = cleanedNoSpace.lastIndexOf(\",\");\n const lastDot = cleanedNoSpace.lastIndexOf(\".\");\n\n if (lastComma > lastDot) {\n // comma likely decimal\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\").replace(\",\", \".\");\n } else if (lastDot > lastComma) {\n // dot likely decimal\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n if (lastComma > lastDot) {\n // comma is likely decimal\n const beforeDecimal = cleanedNoSpace\n .slice(0, lastComma)\n .replace(/,/g, \"\")\n .replace(/\\./g, \"\");\n const afterDecimal = cleanedNoSpace.slice(lastComma + 1);\n cleanedNoSpace = beforeDecimal + \".\" + afterDecimal;\n } else if (lastDot > lastComma) {\n // dot is likely decimal\n const beforeDecimal = cleanedNoSpace\n .slice(0, lastDot)\n .replace(/\\./g, \"\")\n .replace(/,/g, \"\");\n const afterDecimal = cleanedNoSpace.slice(lastDot + 1);\n cleanedNoSpace = beforeDecimal + \".\" + afterDecimal;\n } else if (lastComma !== -1) {\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else if (lastDot !== -1) {\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\");\n }\n }\n }\n }\n\n const num = parseFloat(cleanedNoSpace) || 0;\n return isNegative ? -num : num;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa,uBACX,UACW;CACX,IAAI,CAAC,iBAAiB,MAAM,EAAE,OAAO;CAErC,IAAI,UAAU,MACX,MAAM,CACN,QAAQ,WAAW,GAAG,CACtB,QAAQ,WAAW,GAAG;CAGzB,IAAI,aAAa;CACjB,IAAI,WAAW,KAAK,QAAQ,EAAE;EAC5B,aAAa;EACb,UAAU,QAAQ,MAAM,GAAG,GAAG,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ClC,IAAI,cAAc,IACvB,iBAAiB,eAAe,QAAQ,MAAM,GAAG;QAC5C,IAAI,YAAY,IACrB,iBAAiB,eAAe,QAAQ,OAAO,GAAG;;;CAM1D,MAAM,MAAM,WAAW,eAAe,IAAI;CAC1C,OAAO,aAAa,CAAC,MAAM"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
|
-
const require_assertIsBoolean = require('./assertIsBoolean-
|
|
11
|
+
const require_assertIsBoolean = require('./assertIsBoolean-JGpkg5ju.cjs');
|
|
12
12
|
const parseCurrencyString = (input) => {
|
|
13
13
|
if (!require_assertIsBoolean.isNonEmptyString(input)) return 0;
|
|
14
14
|
let trimmed = input.trim().replace(/\u00A0/g, "").replace(/\u202F/g, "");
|
|
@@ -53,4 +53,4 @@ Object.defineProperty(exports, 'parseCurrencyString', {
|
|
|
53
53
|
return parseCurrencyString;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
//# sourceMappingURL=parsing-
|
|
56
|
+
//# sourceMappingURL=parsing-CU_Mc7CF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsing-
|
|
1
|
+
{"version":3,"file":"parsing-CU_Mc7CF.cjs","names":["isNonEmptyString"],"sources":["../src/conversions/currency/parsing.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** -------------------------------------------------------------\n * * ***Utility: `parseCurrencyString`.***\n * ---------------------------------------------\n * **Parses a human-friendly currency string into a JavaScript number.**\n * - **Supports multi-locale formats:**\n * - ***US:*** `\"15,000.10\"` ➔ `15300.10`.\n * - ***Swiss:*** `\"15'000.10\"` ➔ `15300.10`.\n * - ***French:*** `\"15 000,10\"` ➔ `15300.10`.\n * - ***Indian:*** `\"1,23,456.78\"` ➔ `123456.78`.\n * - ***European:*** `\"151.000,10\"` ➔ `151300.10`.\n * - ***Compact:*** `\"15300000,10\"` ➔ `15300000.10`.\n * - **Features:**\n * - Strips symbols automatically: `\"Rp\"`, `\"$\"`, `\"EUR\"`, `etc`.\n * - Handles bracket negatives: `\"(15.000,10)\"` ➔ `-15300.10`.\n * - Normalizes decimal separator (last dot or comma).\n * - Detects non-breaking spaces (`\\u00A0`, `\\u202F`) often in European data.\n * - Fallback to `0` for empty, invalid, or non-numeric strings.\n * - **How it parses internally:**\n * 1. Removes all characters except digits, `.`, `,`, `'`, `space`,\n * `\\u00A0`, `\\u202F`.\n * 2. Detects bracket (...) as negative.\n * 3. If Indian style (`1,23,456`) detected by multiple ,`\\d{2}`, removes all commas.\n * 4. Otherwise:\n * - If multiple dots & no commas ➔ thousands: removes all `.`.\n * - If multiple commas & no dots ➔ thousands: removes all `,`.\n * - If mixed, treats last `,` or `.` as decimal.\n * 5. Converts final decimal to `.` for JS float.\n * - **Gotchas:**\n * - If both `.` and `,` are present, last occurrence is used as decimal.\n * - For strings like `\"1.121.234,56\"` ➔ decimal is `,`.\n * - For `\"1,121,234.56\"` ➔ decimal is `.`.\n * - For `\"15300000,2121\"` ➔ decimal becomes `.` internally.\n * - **ℹ️ Note:**\n * - You can use this function as a first step to **sanitize currency inputs**\n * before storing into database or doing math.\n * - Always pair this with your formatter for consistent output display.\n * @param {string|null|undefined} input\n * ***Any messy currency string, may contain:***\n * * Currency symbols (`Rp`,`$`, `CHF`, `EUR`).\n * * Thousands separators (`.`, `,`, `'`, `space`, `\\u00A0`, `\\u202F`).\n * * Various decimal formats (`,` or `.`).\n * * Bracket negative: `\"(15.000,10)\"`.\n * @returns {number} JavaScript float representation, will return `0` for invalid, empty, or non-string input.\n * @example\n * ```ts\n * parseCurrencyString(\"Rp 15.300.000,21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"15 300 000,21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"CHF 15'300'000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"$15,300,000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"(15.000,10)\");\n * // ➔ -15000.10\n * parseCurrencyString(\"1,23,456.78\");\n * // ➔ 123456.78\n * parseCurrencyString(\"15300000,2121\");\n * // ➔ 15300000.2121\n * parseCurrencyString(\"USD 15 300 000.21\");\n * // ➔ 15300000.21\n * parseCurrencyString(\"\");\n * // ➔ 0\n * parseCurrencyString(\"abc\");\n * // ➔ 0\n * ```\n */\nexport const parseCurrencyString = (\n input: string | null | undefined\n): number => {\n if (!isNonEmptyString(input)) return 0;\n\n let trimmed = input\n .trim()\n .replace(/\\u00A0/g, \"\")\n .replace(/\\u202F/g, \"\");\n\n // detect brackets (accounting style)\n let isNegative = false;\n if (/^\\(.*\\)$/.test(trimmed)) {\n isNegative = true;\n trimmed = trimmed.slice(1, -1).trim();\n }\n\n trimmed = trimmed\n .replace(/^[-\\s]+/, (match) => (match.includes(\"-\") ? \"-\" : \"\"))\n .replace(/[\\s.,-]+$/, \"\");\n\n isNegative = isNegative || /^-/.test(trimmed) || /^[^\\d]*-/.test(trimmed);\n const cleaned = trimmed.replace(/[^0-9.,'\\s]/g, \"\");\n let cleanedNoSpace = cleaned.replace(/[\\s']/g, \"\");\n\n // detect Indian style (like 1,23,456)\n const indianMatches = cleanedNoSpace.match(/,\\d{2}/g);\n const isIndianStyle = indianMatches && indianMatches.length > 1;\n if (isIndianStyle) {\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n const dotCount = (cleanedNoSpace.match(/\\./g) || []).length;\n const commaCount = (cleanedNoSpace.match(/,/g) || []).length;\n\n if (dotCount > 1 && commaCount === 0) {\n // e.g. \"1.121.234\"\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\");\n } else if (commaCount > 1 && dotCount === 0) {\n // e.g. \"1,121,234\"\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n // mixed, or single\n const lastComma = cleanedNoSpace.lastIndexOf(\",\");\n const lastDot = cleanedNoSpace.lastIndexOf(\".\");\n\n if (lastComma > lastDot) {\n // comma likely decimal\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\").replace(\",\", \".\");\n } else if (lastDot > lastComma) {\n // dot likely decimal\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else {\n if (lastComma > lastDot) {\n // comma is likely decimal\n const beforeDecimal = cleanedNoSpace\n .slice(0, lastComma)\n .replace(/,/g, \"\")\n .replace(/\\./g, \"\");\n const afterDecimal = cleanedNoSpace.slice(lastComma + 1);\n cleanedNoSpace = beforeDecimal + \".\" + afterDecimal;\n } else if (lastDot > lastComma) {\n // dot is likely decimal\n const beforeDecimal = cleanedNoSpace\n .slice(0, lastDot)\n .replace(/\\./g, \"\")\n .replace(/,/g, \"\");\n const afterDecimal = cleanedNoSpace.slice(lastDot + 1);\n cleanedNoSpace = beforeDecimal + \".\" + afterDecimal;\n } else if (lastComma !== -1) {\n cleanedNoSpace = cleanedNoSpace.replace(/,/g, \"\");\n } else if (lastDot !== -1) {\n cleanedNoSpace = cleanedNoSpace.replace(/\\./g, \"\");\n }\n }\n }\n }\n\n const num = parseFloat(cleanedNoSpace) || 0;\n return isNegative ? -num : num;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa,uBACX,UACW;CACX,IAAI,CAACA,yCAAiB,MAAM,EAAE,OAAO;CAErC,IAAI,UAAU,MACX,MAAM,CACN,QAAQ,WAAW,GAAG,CACtB,QAAQ,WAAW,GAAG;CAGzB,IAAI,aAAa;CACjB,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,GAAG;IACpB,MAAM,eAAe,eAAe,MAAM,UAAU,EAAE;IACtD,iBAAiB,gBAAgB,MAAM;UAClC,IAAI,cAAc,IACvB,iBAAiB,eAAe,QAAQ,MAAM,GAAG;QAC5C,IAAI,YAAY,IACrB,iBAAiB,eAAe,QAAQ,OAAO,GAAG;;;CAM1D,MAAM,MAAM,WAAW,eAAe,IAAI;CAC1C,OAAO,aAAa,CAAC,MAAM"}
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
12
|
-
const require_assertIsBoolean = require('../assertIsBoolean-
|
|
13
|
-
const require_isBigInt = require('../isBigInt-
|
|
14
|
-
const require_isEmptyObject = require('../isEmptyObject-
|
|
15
|
-
const require_isFinite = require('../isFinite-
|
|
16
|
-
const require_safeStableStringify = require('../safeStableStringify-
|
|
17
|
-
const require_isEqual = require('../isEqual-
|
|
18
|
-
const require_isEmptyString = require('../isEmptyString-
|
|
19
|
-
const require_isEmptyValue = require('../isEmptyValue-
|
|
20
|
-
const require_isTypedArray = require('../isTypedArray-
|
|
21
|
-
const require_isServer = require('../isServer-
|
|
22
|
-
const require_isInteger = require('../isInteger-
|
|
23
|
-
const require_predicates = require('../predicates-
|
|
24
|
-
const require_isValidDomain = require('../isValidDomain-
|
|
12
|
+
const require_assertIsBoolean = require('../assertIsBoolean-JGpkg5ju.cjs');
|
|
13
|
+
const require_isBigInt = require('../isBigInt-C0gHDkh4.cjs');
|
|
14
|
+
const require_isEmptyObject = require('../isEmptyObject-D-fETD_f.cjs');
|
|
15
|
+
const require_isFinite = require('../isFinite-0z31xOa2.cjs');
|
|
16
|
+
const require_safeStableStringify = require('../safeStableStringify-BiUOLBYo.cjs');
|
|
17
|
+
const require_isEqual = require('../isEqual-CZxetLzm.cjs');
|
|
18
|
+
const require_isEmptyString = require('../isEmptyString-Dx6OM5PL.cjs');
|
|
19
|
+
const require_isEmptyValue = require('../isEmptyValue-v6BsHBiu.cjs');
|
|
20
|
+
const require_isTypedArray = require('../isTypedArray-pAdBFUDl.cjs');
|
|
21
|
+
const require_isServer = require('../isServer-TOmhgOtP.cjs');
|
|
22
|
+
const require_isInteger = require('../isInteger-DUhd-dyt.cjs');
|
|
23
|
+
const require_predicates = require('../predicates-Bd4AnXr0.cjs');
|
|
24
|
+
const require_isValidDomain = require('../isValidDomain-BMcr9vTp.cjs');
|
|
25
25
|
exports.areArraysEqual = require_predicates.areArraysEqual;
|
|
26
26
|
exports.areObjectsEqual = require_predicates.areObjectsEqual;
|
|
27
27
|
exports.areURLsEqualPath = require_predicates.areURLsEqualPath;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { a as IsNumberOptions, c as GetPreciseTypeOptions, l as getPreciseType, n as isPlainObject, o as isNumber, s as AcronymsList, t as IsPlainObjectResult } from "../isPlainObject-
|
|
12
|
-
import { $ as isArrayBuffer, A as isInteger, B as isEmptyDeep, C as isNil, D as isMatch, E as isMatchWith, F as isEqualWith, G as isDate, H as isEmpty, I as isEqual, J as isBooleanObject, K as isCurrencyLike, L as isEmptyValue, M as isFunction, N as isFinite, O as isMap, P as isError, Q as isArrayLike, R as isEmptyString, S as isNonEmptyArray, T as isNaN, U as isElement, V as isEmptyArray, W as isDeepEqual, X as isBigInt, Y as isBoolean, Z as isArrayLikeObject, _ as isObject, a as isURL, at as textContainsAny, b as isNonEmptyValue, c as isStringObject, ct as areURLsEqualPath, d as isServer, et as isArray, f as isSafeInteger, g as isObjectLoose, h as isObjectOrArray, i as isUndefined, it as doesKeyExist, j as isInfinityNumber, k as isLength, l as isString, lt as areObjectsEqual, m as isPropertyKey, n as isValidURL, nt as hasOwnProp, o as isTypedArray, ot as textContainsAll, p as isRegExp, q as isBuffer, r as isValidDomain, rt as arrayHasAnyMatch, s as isSymbol, st as areURLsIdentical, t as isWeakMap, tt as isArguments, u as isSet, ut as areArraysEqual, v as isNumberObject, w as isNative, x as isNonEmptyString, y as isNull, z as isEmptyObject } from "../index-
|
|
11
|
+
import { a as IsNumberOptions, c as GetPreciseTypeOptions, l as getPreciseType, n as isPlainObject, o as isNumber, s as AcronymsList, t as IsPlainObjectResult } from "../isPlainObject-DvxdHoAf.cjs";
|
|
12
|
+
import { $ as isArrayBuffer, A as isInteger, B as isEmptyDeep, C as isNil, D as isMatch, E as isMatchWith, F as isEqualWith, G as isDate, H as isEmpty, I as isEqual, J as isBooleanObject, K as isCurrencyLike, L as isEmptyValue, M as isFunction, N as isFinite, O as isMap, P as isError, Q as isArrayLike, R as isEmptyString, S as isNonEmptyArray, T as isNaN, U as isElement, V as isEmptyArray, W as isDeepEqual, X as isBigInt, Y as isBoolean, Z as isArrayLikeObject, _ as isObject, a as isURL, at as textContainsAny, b as isNonEmptyValue, c as isStringObject, ct as areURLsEqualPath, d as isServer, et as isArray, f as isSafeInteger, g as isObjectLoose, h as isObjectOrArray, i as isUndefined, it as doesKeyExist, j as isInfinityNumber, k as isLength, l as isString, lt as areObjectsEqual, m as isPropertyKey, n as isValidURL, nt as hasOwnProp, o as isTypedArray, ot as textContainsAll, p as isRegExp, q as isBuffer, r as isValidDomain, rt as arrayHasAnyMatch, s as isSymbol, st as areURLsIdentical, t as isWeakMap, tt as isArguments, u as isSet, ut as areArraysEqual, v as isNumberObject, w as isNative, x as isNonEmptyString, y as isNull, z as isEmptyObject } from "../index-s7h0w-8H.cjs";
|
|
13
13
|
export { AcronymsList, GetPreciseTypeOptions, IsNumberOptions, IsPlainObjectResult, areArraysEqual, areObjectsEqual, areURLsEqualPath, areURLsIdentical, arrayHasAnyMatch, doesKeyExist, getPreciseType, 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, isNumber, isNumberObject, isObject, isObjectLoose, isObjectOrArray, isPlainObject, isPropertyKey, isRegExp, isSafeInteger, isServer, isSet, isString, isStringObject, isSymbol, isTypedArray, isURL, isUndefined, isValidDomain, isValidURL, isWeakMap, textContainsAll, textContainsAny };
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { a as IsNumberOptions, c as GetPreciseTypeOptions, l as getPreciseType, n as isPlainObject, o as isNumber, s as AcronymsList, t as IsPlainObjectResult } from "../isPlainObject-
|
|
12
|
-
import { $ as isArrayBuffer, A as isInteger, B as isEmptyDeep, C as isNil, D as isMatch, E as isMatchWith, F as isEqualWith, G as isDate, H as isEmpty, I as isEqual, J as isBooleanObject, K as isCurrencyLike, L as isEmptyValue, M as isFunction, N as isFinite, O as isMap, P as isError, Q as isArrayLike, R as isEmptyString, S as isNonEmptyArray, T as isNaN, U as isElement, V as isEmptyArray, W as isDeepEqual, X as isBigInt, Y as isBoolean, Z as isArrayLikeObject, _ as isObject, a as isURL, at as textContainsAny, b as isNonEmptyValue, c as isStringObject, ct as areURLsEqualPath, d as isServer, et as isArray, f as isSafeInteger, g as isObjectLoose, h as isObjectOrArray, i as isUndefined, it as doesKeyExist, j as isInfinityNumber, k as isLength, l as isString, lt as areObjectsEqual, m as isPropertyKey, n as isValidURL, nt as hasOwnProp, o as isTypedArray, ot as textContainsAll, p as isRegExp, q as isBuffer, r as isValidDomain, rt as arrayHasAnyMatch, s as isSymbol, st as areURLsIdentical, t as isWeakMap, tt as isArguments, u as isSet, ut as areArraysEqual, v as isNumberObject, w as isNative, x as isNonEmptyString, y as isNull, z as isEmptyObject } from "../index-
|
|
11
|
+
import { a as IsNumberOptions, c as GetPreciseTypeOptions, l as getPreciseType, n as isPlainObject, o as isNumber, s as AcronymsList, t as IsPlainObjectResult } from "../isPlainObject-CjoJH9yk.js";
|
|
12
|
+
import { $ as isArrayBuffer, A as isInteger, B as isEmptyDeep, C as isNil, D as isMatch, E as isMatchWith, F as isEqualWith, G as isDate, H as isEmpty, I as isEqual, J as isBooleanObject, K as isCurrencyLike, L as isEmptyValue, M as isFunction, N as isFinite, O as isMap, P as isError, Q as isArrayLike, R as isEmptyString, S as isNonEmptyArray, T as isNaN, U as isElement, V as isEmptyArray, W as isDeepEqual, X as isBigInt, Y as isBoolean, Z as isArrayLikeObject, _ as isObject, a as isURL, at as textContainsAny, b as isNonEmptyValue, c as isStringObject, ct as areURLsEqualPath, d as isServer, et as isArray, f as isSafeInteger, g as isObjectLoose, h as isObjectOrArray, i as isUndefined, it as doesKeyExist, j as isInfinityNumber, k as isLength, l as isString, lt as areObjectsEqual, m as isPropertyKey, n as isValidURL, nt as hasOwnProp, o as isTypedArray, ot as textContainsAll, p as isRegExp, q as isBuffer, r as isValidDomain, rt as arrayHasAnyMatch, s as isSymbol, st as areURLsIdentical, t as isWeakMap, tt as isArguments, u as isSet, ut as areArraysEqual, v as isNumberObject, w as isNative, x as isNonEmptyString, y as isNull, z as isEmptyObject } from "../index-BcKPWWfh.js";
|
|
13
13
|
export { AcronymsList, GetPreciseTypeOptions, IsNumberOptions, IsPlainObjectResult, areArraysEqual, areObjectsEqual, areURLsEqualPath, areURLsIdentical, arrayHasAnyMatch, doesKeyExist, getPreciseType, 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, isNumber, isNumberObject, isObject, isObjectLoose, isObjectOrArray, isPlainObject, isPropertyKey, isRegExp, isSafeInteger, isServer, isSet, isString, isStringObject, isSymbol, isTypedArray, isURL, isUndefined, isValidDomain, isValidURL, isWeakMap, textContainsAll, textContainsAny };
|
package/dist/predicates/index.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
|
-
import { A as isPlainObject, C as isSymbol, D as isNaN, E as isNull, F as isBoolean, M as isArray, N as isNil, O as isNumberObject, P as isFunction, S as isUndefined, _ as isBuffer, b as hasOwnProp, f as isSet, g as isStringObject, h as isBooleanObject, j as isObject, k as isString, m as isInfinityNumber, p as isNonEmptyArray, r as getPreciseType, v as isError, w as isNumber, x as isObjectOrArray, y as isNonEmptyString } from "../assertIsBoolean-
|
|
11
|
-
import { t as isBigInt } from "../isBigInt-
|
|
12
|
-
import { n as isEmptyArray, t as isEmptyObject } from "../isEmptyObject-
|
|
13
|
-
import { t as isFinite } from "../isFinite-
|
|
14
|
-
import { n as isDate, r as isMap } from "../safeStableStringify-
|
|
15
|
-
import { i as isRegExp, r as isArrayBuffer, t as isEqual } from "../isEqual-
|
|
16
|
-
import { t as isEmptyString } from "../isEmptyString-
|
|
17
|
-
import { t as isEmptyValue } from "../isEmptyValue-
|
|
18
|
-
import { n as isNonEmptyValue, t as isTypedArray } from "../isTypedArray-
|
|
19
|
-
import { t as isServer } from "../isServer-
|
|
20
|
-
import { t as isInteger } from "../isInteger-
|
|
21
|
-
import { C as areURLsIdentical, E as areArraysEqual, S as textContainsAll, T as areObjectsEqual, _ as isArguments, a as isNative, b as isPropertyKey, c as isEqualWith, d as isElement, f as isDeepEqual, g as isLength, h as isArrayLike, i as isObjectLoose, l as isEmptyDeep, m as isArrayLikeObject, n as isValidURL, o as isMatch, p as isCurrencyLike, r as isSafeInteger, s as isMatchWith, t as isWeakMap, u as isEmpty, v as arrayHasAnyMatch, w as areURLsEqualPath, x as textContainsAny, y as doesKeyExist } from "../predicates-
|
|
22
|
-
import { i as isURL, t as isValidDomain } from "../isValidDomain-
|
|
10
|
+
import { A as isPlainObject, C as isSymbol, D as isNaN, E as isNull, F as isBoolean, M as isArray, N as isNil, O as isNumberObject, P as isFunction, S as isUndefined, _ as isBuffer, b as hasOwnProp, f as isSet, g as isStringObject, h as isBooleanObject, j as isObject, k as isString, m as isInfinityNumber, p as isNonEmptyArray, r as getPreciseType, v as isError, w as isNumber, x as isObjectOrArray, y as isNonEmptyString } from "../assertIsBoolean-9-huIcIR.js";
|
|
11
|
+
import { t as isBigInt } from "../isBigInt-bbW78ITJ.js";
|
|
12
|
+
import { n as isEmptyArray, t as isEmptyObject } from "../isEmptyObject-CZsFdN7x.js";
|
|
13
|
+
import { t as isFinite } from "../isFinite-CI59vUHt.js";
|
|
14
|
+
import { n as isDate, r as isMap } from "../safeStableStringify-C5Gc3ZED.js";
|
|
15
|
+
import { i as isRegExp, r as isArrayBuffer, t as isEqual } from "../isEqual-Dc8fNB2J.js";
|
|
16
|
+
import { t as isEmptyString } from "../isEmptyString-pmcf-orv.js";
|
|
17
|
+
import { t as isEmptyValue } from "../isEmptyValue-CkiXENcT.js";
|
|
18
|
+
import { n as isNonEmptyValue, t as isTypedArray } from "../isTypedArray-BPerK072.js";
|
|
19
|
+
import { t as isServer } from "../isServer-BM5GzRpI.js";
|
|
20
|
+
import { t as isInteger } from "../isInteger-DeN5FIAr.js";
|
|
21
|
+
import { C as areURLsIdentical, E as areArraysEqual, S as textContainsAll, T as areObjectsEqual, _ as isArguments, a as isNative, b as isPropertyKey, c as isEqualWith, d as isElement, f as isDeepEqual, g as isLength, h as isArrayLike, i as isObjectLoose, l as isEmptyDeep, m as isArrayLikeObject, n as isValidURL, o as isMatch, p as isCurrencyLike, r as isSafeInteger, s as isMatchWith, t as isWeakMap, u as isEmpty, v as arrayHasAnyMatch, w as areURLsEqualPath, x as textContainsAny, y as doesKeyExist } from "../predicates-VJN-VDha.js";
|
|
22
|
+
import { i as isURL, t as isValidDomain } from "../isValidDomain-CHKOn79-.js";
|
|
23
23
|
export { areArraysEqual, areObjectsEqual, areURLsEqualPath, areURLsIdentical, arrayHasAnyMatch, doesKeyExist, getPreciseType, 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, isNumber, isNumberObject, isObject, isObjectLoose, isObjectOrArray, isPlainObject, isPropertyKey, isRegExp, isSafeInteger, isServer, isSet, isString, isStringObject, isSymbol, isTypedArray, isURL, isUndefined, isValidDomain, isValidURL, isWeakMap, textContainsAll, textContainsAny };
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.0
|
|
5
|
+
* Version: `3.13.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
|
-
const require_assertIsBoolean = require('./assertIsBoolean-
|
|
12
|
-
const require_assertIsString = require('./assertIsString-
|
|
13
|
-
const require_isEmptyObject = require('./isEmptyObject-
|
|
14
|
-
const require_safeStableStringify = require('./safeStableStringify-
|
|
15
|
-
const require_isEqual = require('./isEqual-
|
|
16
|
-
const require_isEmptyString = require('./isEmptyString-
|
|
17
|
-
const require_isTypedArray = require('./isTypedArray-
|
|
18
|
-
const require_parsing = require('./parsing-
|
|
19
|
-
const require_isValidDomain = require('./isValidDomain-
|
|
11
|
+
const require_assertIsBoolean = require('./assertIsBoolean-JGpkg5ju.cjs');
|
|
12
|
+
const require_assertIsString = require('./assertIsString-UR6QjqyZ.cjs');
|
|
13
|
+
const require_isEmptyObject = require('./isEmptyObject-D-fETD_f.cjs');
|
|
14
|
+
const require_safeStableStringify = require('./safeStableStringify-BiUOLBYo.cjs');
|
|
15
|
+
const require_isEqual = require('./isEqual-CZxetLzm.cjs');
|
|
16
|
+
const require_isEmptyString = require('./isEmptyString-Dx6OM5PL.cjs');
|
|
17
|
+
const require_isTypedArray = require('./isTypedArray-pAdBFUDl.cjs');
|
|
18
|
+
const require_parsing = require('./parsing-CU_Mc7CF.cjs');
|
|
19
|
+
const require_isValidDomain = require('./isValidDomain-BMcr9vTp.cjs');
|
|
20
20
|
const areArraysEqual = (array1, array2, ignoreOrder = false) => {
|
|
21
21
|
if (!(require_assertIsBoolean.isArray(array1) && require_assertIsBoolean.isArray(array2))) throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${require_assertIsBoolean.getPreciseType(array1)}\`, 'array2': \`${require_assertIsBoolean.getPreciseType(array2)}\`].`);
|
|
22
22
|
require_assertIsBoolean.assertIsBoolean(ignoreOrder, { message: ({ currentType, validType }) => `Third parameter \`ignoreOrder\` must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
@@ -409,4 +409,4 @@ Object.defineProperty(exports, 'textContainsAny', {
|
|
|
409
409
|
return textContainsAny;
|
|
410
410
|
}
|
|
411
411
|
});
|
|
412
|
-
//# sourceMappingURL=predicates-
|
|
412
|
+
//# sourceMappingURL=predicates-Bd4AnXr0.cjs.map
|