{"_id":"@emadzedan80/pro-utilities","_rev":"7-af5d44466e95694ba693df32c1c4120f","name":"@emadzedan80/pro-utilities","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@emadzedan80/pro-utilities","version":"1.0.0","keywords":["javascript","ecmascript","npm","package","math","form","validation","form validation","array","object","date","time","Helper","utility","utilities","function","functions","frontend","node","emad","zedan","emad zedan","emadzedan","emadzedan80","git","github"],"author":{"url":"https://emadzedan.com","name":"Emad Zedan","email":"emadzedan@gmail.com"},"license":"MIT","_id":"@emadzedan80/pro-utilities@1.0.0","maintainers":[{"name":"emadzedan80","email":"emadzedan@gmail.com"}],"dist":{"shasum":"ed06bfba7efd7aa6d78ccfb56dde32629e50319a","tarball":"https://registry.npmjs.org/@emadzedan80/pro-utilities/-/pro-utilities-1.0.0.tgz","fileCount":4,"integrity":"sha512-1VNIZiuvxIflLitYbaqVC4F0dI8X3IpRu6lCb24fqrrL+GZRnke0JyzFbIyxVupIc7BVrWZfmEcGynTdLp6riw==","signatures":[{"sig":"MEUCIQCLjdJE917H1L7YcHHbPLjPqmJQ+9lFmGr8fSQOS3B6vQIge9ptyixeMDZhqLfcBBtVQUi3NM8x4Ui8MCXP+ujgEqU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76868},"main":"index.js","type":"module","_npmUser":{"name":"emadzedan80","email":"emadzedan@gmail.com"},"_npmVersion":"11.6.2","description":"A Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing","directories":{},"_nodeVersion":"23.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pro-utilities_1.0.0_1764178076225_0.6241350564632826","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@emadzedan80/pro-utilities","version":"1.1.0","keywords":["javascript","ecmascript","npm","package","math","form","validation","form validation","array","object","date","time","Helper","utility","utilities","function","functions","frontend","node","emad","zedan","emad zedan","emadzedan","emadzedan80","git","github"],"author":{"url":"https://emadzedan.com","name":"Emad Zedan","email":"emadzedan@gmail.com"},"license":"MIT","_id":"@emadzedan80/pro-utilities@1.1.0","maintainers":[{"name":"emadzedan80","email":"emadzedan@gmail.com"}],"dist":{"shasum":"2960a34d86302ad4cd71a880f9e8bf363048dae6","tarball":"https://registry.npmjs.org/@emadzedan80/pro-utilities/-/pro-utilities-1.1.0.tgz","fileCount":4,"integrity":"sha512-WK6z+YrPZ0Zgom0ihsWhd4/9INelE8ls7oF1DKaBv16LeTH35XzSAeDdmgNuCYbdcvnR8TnxgvzU1ntfQFb19w==","signatures":[{"sig":"MEQCIHReXqFfLgLazKNAQoGBWU0rzGVL2/XQen1gu59WF66EAiAsZ+dani3XS4mE0FeIeJJXpIZ24QYNYhfAjBGQj75z5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76884},"main":"index.js","type":"module","_npmUser":{"name":"emadzedan80","email":"emadzedan@gmail.com"},"_npmVersion":"11.6.2","description":"A Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing","directories":{},"_nodeVersion":"23.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pro-utilities_1.1.0_1764181103637_0.5635550818040185","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@emadzedan80/pro-utilities","version":"1.1.1","keywords":["javascript","ecmascript","npm","package","math","form","validation","form validation","array","object","date","time","Helper","utility","utilities","function","functions","frontend","node","emad","zedan","emad zedan","emadzedan","emadzedan80","git","github"],"author":{"url":"https://emadzedan.com","name":"Emad Zedan","email":"emadzedan@gmail.com"},"license":"MIT","_id":"@emadzedan80/pro-utilities@1.1.1","maintainers":[{"name":"emadzedan80","email":"emadzedan@gmail.com"}],"dist":{"shasum":"911f0ece1b7bc5a7c72d3bb94b0bfdc781e5422e","tarball":"https://registry.npmjs.org/@emadzedan80/pro-utilities/-/pro-utilities-1.1.1.tgz","fileCount":4,"integrity":"sha512-FIo5rHWJNHEPSsk4h0z33fCJlX/+bI0VjgQHqBw8dpO7n7mN8PNCvzqRJD20KQiLiSAKvsoQMX2aul9rAmijnA==","signatures":[{"sig":"MEUCIHsdkMiPQYfrr9HWdGUHKqxhZYy5gIkVC+hzvlO2pjvmAiEAtWoXoU9h/dx/RiQZ2ty8wW1MlRsbIMzKYKM0VuYQskw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76868},"main":"index.js","type":"module","_npmUser":{"name":"emadzedan80","email":"emadzedan@gmail.com"},"_npmVersion":"11.6.2","description":"A Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing","directories":{},"_nodeVersion":"23.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pro-utilities_1.1.1_1764181328186_0.9921987948253383","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@emadzedan80/pro-utilities","version":"1.1.2","description":"A Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing","type":"module","keywords":["javascript","ecmascript","npm","package","math","form","validation","form validation","array","object","date","time","Helper","utility","utilities","function","functions","frontend","node","emad","zedan","emad zedan","emadzedan","emadzedan80","git","github"],"license":"MIT","author":{"name":"Emad Zedan","email":"emadzedan@gmail.com","url":"https://emadzedan.com"},"main":"index.js","publishConfig":{"access":"public"},"_id":"@emadzedan80/pro-utilities@1.1.2","_nodeVersion":"23.6.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-VmFIr49N6Wh31ylNf4aFMym02ONXgoy7SO0YOuGJDoxV1yZrNHKg1U/ZSjRoxrSc1E6teHgM1TuGxsGzpTVffw==","shasum":"755a6aef0b0240e0ce5b97b0c02574893776827d","tarball":"https://registry.npmjs.org/@emadzedan80/pro-utilities/-/pro-utilities-1.1.2.tgz","fileCount":4,"unpackedSize":76892,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB7JcLKKcCEydH3tTpVstwA/7Ge1NB5Ze+/mpzXd8GRpAiEA55/q/rrN08qJxJaQqXfpXetPevgayWhVpke1JsCph8U="}]},"_npmUser":{"name":"emadzedan80","email":"emadzedan@gmail.com"},"directories":{},"maintainers":[{"name":"emadzedan80","email":"emadzedan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pro-utilities_1.1.2_1764181986802_0.017357555348719522"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-26T17:27:56.107Z","modified":"2025-11-26T18:33:07.292Z","1.0.1":"2025-11-26T16:31:09.174Z","1.0.2":"2025-11-26T16:56:24.583Z","1.0.0":"2025-11-26T17:27:56.414Z","1.1.0":"2025-11-26T18:18:23.828Z","1.1.1":"2025-11-26T18:22:08.383Z","1.1.2":"2025-11-26T18:33:07.099Z"},"author":{"name":"Emad Zedan","email":"emadzedan@gmail.com","url":"https://emadzedan.com"},"license":"MIT","keywords":["javascript","ecmascript","npm","package","math","form","validation","form validation","array","object","date","time","Helper","utility","utilities","function","functions","frontend","node","emad","zedan","emad zedan","emadzedan","emadzedan80","git","github"],"description":"A Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing","maintainers":[{"name":"emadzedan80","email":"emadzedan@gmail.com"}],"readme":"# Emad Zedan Pro Utilities\r\n\r\n## Description\r\nA Full Robust Utility Module Containing 92 Math, Form, Array, Object, Date, Time, Devices Recognition, Browsers Recognition & Helper Utilities Functions, All Functions Are Designed To Fail Silently (Returning null/false) & Log Warnings Instead Of Throwing Errors.\r\n\r\n## ✨ Features\r\n- 🚀 Easy To Use.\r\n- ⚡ Lightweight & Fast.\r\n- 🔧 Fully Customizable Error Free.\r\n- 📦 Ready For Production.\r\n\r\n## 📦 Installation\r\nnpm install @emadzedan80/pro-utilities\r\n\r\n## 🧩 Usage\r\n\r\n```\r\n// This file demonstrates the usage of some the utilities functions exported from index.js.\r\n\r\nimport {\r\n\t// Math Utilities\r\n\tsum, average, min, max, randomFromTo,\r\n\t// Forms Utilities\r\n\tgenerateUniqueNumber, generateUniqueID, isValidName, isURL, isDomain, isIP, isNumeric, isValidPassword, isCamelCase, isSnakeCase, escHTML, escURL, capitalize,\r\n\t// Array Utilities\r\n\tcleanArray, bubbleSortASC, bubbleSortDESC, mergeArrays, arrayHasValue, arrayRemoveDuplicates, generateArray, cloneDeepArray,\r\n\t// Object Utilities\r\n\tsafeJSONParse, mergeObjects, cloneDeepObject, objectHasKey, objectHasValue,\r\n\t// Date & Time Utilities\r\n\tisStringAValidDate, isSameDayName, shortDayName, fullDayName, shortMonthName, fullMonthName, SeasonName, formatNumericDate, formatShortNamedDate, formatFullNamedDate, formatTime24, formatTime12, addSeconds, subtractSeconds, addMinutes, subtractMinutes, addHours, subtractHours, addDays, subtractDays, addMonths, subtractMonths, addYears, subtractYears, isSatOrSun, isFriOrSat, isFriOrSun, isChristmas, isThanksGiving, isNewYear, isWesternEaster, isEasternEaster,\r\n\t// Devices Utilities\r\n\tisMobile, isAndroidMobile, isHuaweiMobile, isIPhone, isMobileLandscape, isMobilePortrait, isTablet, isAndroidTablet, isHuaweiTablet, isIPad, isTabletLandscape, isTabletPortrait, isDesktop, isIOS, isMacOS, isWindows, isWindows7, isWindows10, isWindows11, isLinux,\r\n\t// Browser Utilities\r\n\tisWebkit, isChrome, isEdge, isFirefox, isOprea, isBrave, isInternetExplorer,\r\n\t// Helper Utilities\r\n\tfahrenheitToCelsius, celsiusToFahrenheit, delay\r\n} from \"https://cdn.jsdelivr.net/npm/@emadzedan80/pro-utilities/+esm\";\r\n\r\n\r\nconst p0 = document.createElement('p');\r\np0.textContent = '=== 🔢 Math Utilities ===';\r\ndocument.body.appendChild(p0);\r\nconsole.log('=== 🔢 Math Utilities ===');\r\n\r\n// sum\r\nconst p1 = document.createElement('p');\r\np1.textContent = 'sum(10, 20, [5, 5], \"100\"): ' + sum(10, 20, [5, 5], \"100\");\r\ndocument.body.appendChild(p1);\r\nconsole.log('sum(10, 20, [5, 5], \"100\"): ' + sum(10, 20, [5, 5], \"100\"));\r\n// Output:  40 (Ignores \"100\", flattens array [5,5])\r\n\r\n// average\r\nconst p2 = document.createElement('p');\r\np2.textContent = 'average(10, 20, 30): ' + average(10, 20, 30);\r\ndocument.body.appendChild(p2);\r\nconsole.log('average(10, 20, 30): ' + average(10, 20, 30));\r\n// Output:  20\r\n\r\n// min\r\nconst p3 = document.createElement('p');\r\np3.textContent = 'min(5, 1, 10, -5): ' + min(5, 1, 10, -5);\r\ndocument.body.appendChild(p3);\r\nconsole.log('min(5, 1, 10, -5): ' + min(5, 1, 10, -5));\r\n// Output:  -5\r\n\r\n// max\r\nconst p4 = document.createElement('p');\r\np4.textContent = 'max(5, 1, 10, -5): ' + max(5, 1, 10, -5);\r\ndocument.body.appendChild(p4);\r\nconsole.log('max(5, 1, 10, -5): ' + max(5, 1, 10, -5));\r\n// Output:  10\r\n\r\n// randomFromTo\r\nconst p5 = document.createElement('p');\r\np5.textContent = 'randomFromTo(1, 10): ' + randomFromTo(1, 10);\r\ndocument.body.appendChild(p5);\r\nconsole.log('randomFromTo(1, 10): ' + randomFromTo(1, 10));\r\n// Output:  Random number between 1 and 10 (e.g., 7)\r\n\r\nconst p00 = document.createElement('p');\r\np00.textContent = '=== 📝 Form Utilities ===';\r\ndocument.body.appendChild(p00);\r\nconsole.log('=== 📝 Form Utilities ===');\r\n\r\n// generateUniqueNumber\r\nconst p6 = document.createElement('p');\r\np6.textContent = 'generateUniqueNumber(): ' + generateUniqueNumber();\r\ndocument.body.appendChild(p6);\r\nconsole.log('generateUniqueNumber(): ' + generateUniqueNumber());\r\n// Output:  Large numeric timestamp (e.g., 1700000000000123)\r\n\r\n// generateUniqueID\r\nconst p7 = document.createElement('p');\r\np7.textContent = 'generateUniqueID(): ' + generateUniqueID();\r\ndocument.body.appendChild(p7);\r\nconsole.log('generateUniqueID(): ' + generateUniqueID());\r\n// Output:  String ID (e.g., \"id-lp3x2s-abc123xyz\")\r\n\r\n// isValidName (Only letters and spaces)\r\nconst p8 = document.createElement('p');\r\np8.textContent = 'isValidName(\"John Doe\"): ' + isValidName(\" John Doe \");\r\ndocument.body.appendChild(p8);\r\nconsole.log('isValidName(\"John Doe\"): ' + isValidName(\" John Doe \")); // Output:  true (Trims input)\r\nconst p9 = document.createElement('p');\r\np9.textContent = 'isValidName(\"John-Doe\"): ' + isValidName(\"John-Doe\");\r\ndocument.body.appendChild(p9);\r\nconsole.log('isValidName(\"John-Doe\"): ' + isValidName(\"John-Doe\")); // Output:  false (Hyphens not allowed)\r\n\r\n// isURL\r\nconst p10 = document.createElement('p');\r\np10.textContent = 'isURL(\"https: //google.com\"): ', isURL(\"https: //google.com\");\r\ndocument.body.appendChild(p10);\r\nconsole.log('isURL(\"https: //google.com\"): ', isURL(\"https: //google.com\")); // Output:  true\r\nconst p11 = document.createElement('p');\r\np11.textContent = 'isURL(\"google.com\"): ' + isURL(\"google.com\");\r\ndocument.body.appendChild(p11);\r\nconsole.log('isURL(\"google.com\"): ' + isURL(\"google.com\")); // Output:  false (Needs protocol)\r\n\r\n// isDomain\r\nconst p12 = document.createElement('p');\r\np12.textContent = 'isDomain(\"example.com\"): ' + isDomain(\"example.com\");\r\ndocument.body.appendChild(p12);\r\nconsole.log('isDomain(\"example.com\"): ' + isDomain(\"example.com\")); // Output:  true\r\nconst p13 = document.createElement('p');\r\np13.textContent = 'isDomain(\"sub.domain-name.net\"): ' + isDomain(\"sub.domain-name.net\");\r\ndocument.body.appendChild(p13);\r\nconsole.log('isDomain(\"sub.domain-name.net\"): ' + isDomain(\"sub.domain-name.net\")); // Output:  true\r\nconst p14 = document.createElement('p');\r\np14.textContent = 'isDomain(\"invalid domain!\"): ' + isDomain(\"invalid domain!\");\r\ndocument.body.appendChild(p14);\r\nconsole.log('isDomain(\"invalid domain!\"): ' + isDomain(\"invalid domain!\")); // Output:  false\r\n\r\n// isIP\r\nconst p15 = document.createElement('p');\r\np15.textContent = 'isDomain(\"invalid domain!\"): ' + isDomain(\"invalid domain!\");\r\ndocument.body.appendChild(p15);\r\nconsole.log('isIP(\"192.168.1.1\"): ' + isIP(\"192.168.1.1\")); // Output:  true\r\nconst p16 = document.createElement('p');\r\np16.textContent = 'isDomain(\"invalid domain!\"): ' + isDomain(\"invalid domain!\");\r\ndocument.body.appendChild(p16);\r\nconsole.log('isIP(\"256.0.0.1\"): ' + isIP(\"256.0.0.1\") + \"(Octet > 255)\"); // Output:  false (Octet > 255)\r\nconst p17 = document.createElement('p');\r\np17.textContent = 'isIP(\"1.2.3\"): ' + isIP(\"1.2.3\") + \"(Incomplete)\";\r\ndocument.body.appendChild(p17);\r\nconsole.log('isIP(\"1.2.3\"): ' + isIP(\"1.2.3\")); // Output:  false (Incomplete)\r\n\r\n// isNumeric\r\nconst p18 = document.createElement('p');\r\np18.textContent = 'isNumeric(\"123.45\"): ' + isNumeric(\"123.45\");\r\ndocument.body.appendChild(p18);\r\nconsole.log('isNumeric(\"123.45\"): ' + isNumeric(\"123.45\")); // Output:  true\r\nconst p19 = document.createElement('p');\r\np19.textContent = 'isNumeric(\"12abc\"): ' + isNumeric(\"12abc\");\r\ndocument.body.appendChild(p19);\r\nconsole.log('isNumeric(\"12abc\"): ' + isNumeric(\"12abc\")); // Output:  false\r\n\r\n// isValidPassword (Min 8, 1 Upper, 1 Lower, 1 Number, 1 Symbol)\r\nconst p20 = document.createElement('p');\r\np20.textContent = 'isValidPassword(\"Pass@123\"): ' + isValidPassword(\"Pass@123\");\r\ndocument.body.appendChild(p20);\r\nconsole.log('isValidPassword(\"Pass@123\"): ' + isValidPassword(\"Pass@123\")); // Output:  true\r\nconst p21 = document.createElement('p');\r\np21.textContent = 'isValidPassword(\"password\"): ' + isValidPassword(\"password\");\r\ndocument.body.appendChild(p21);\r\nconsole.log('isValidPassword(\"password\"): ' + isValidPassword(\"password\")); // Output:  false (No upper, no number, no symbol)\r\nconst p22 = document.createElement('p');\r\np22.textContent = 'isValidPassword(\"PASSWORD123!\"): ' + isValidPassword(\"PASSWORD123!\");\r\ndocument.body.appendChild(p22);\r\nconsole.log('isValidPassword(\"PASSWORD123!\"): ' + isValidPassword(\"PASSWORD123!\")); // Output:  false (No lower)\r\n\r\n// isCamelCase\r\nconst p23 = document.createElement('p');\r\np23.textContent = 'isCamelCase(\"myVarName\"): ' + isCamelCase(\"myVarName\");\r\ndocument.body.appendChild(p23);\r\nconsole.log('isCamelCase(\"myVarName\"): ' + isCamelCase(\"myVarName\")); // Output:  true\r\nconst p24 = document.createElement('p');\r\np24.textContent = 'isCamelCase(\"MyVar\"): ' + isCamelCase(\"MyVar\");\r\ndocument.body.appendChild(p24);\r\nconsole.log('isCamelCase(\"MyVar\"): ' + isCamelCase(\"MyVar\")); // Output:  false (Must start lowercase)\r\n\r\n// isSnakeCase\r\nconst p25 = document.createElement('p');\r\np25.textContent = 'isSnakeCase(\"my_var_name\"): ' + isSnakeCase(\"my_var_name\");\r\ndocument.body.appendChild(p25);\r\nconsole.log('isSnakeCase(\"my_var_name\"): ' + isSnakeCase(\"my_var_name\")); // Output:  true\r\n\r\n// escHTML\r\nconst p26 = document.createElement('p');\r\np26.textContent = 'escHTML(\"<script>\"): ' + escHTML(\"<script>\");\r\ndocument.body.appendChild(p26);\r\nconsole.log('escHTML(\"<script>\"): ' + escHTML(\"<script>\"));\r\n// Output:  \"&lt;script&gt;\"\r\n\r\n// escURL\r\nconst p27 = document.createElement('p');\r\np27.textContent = 'escURL(\"hello world?\"): ' + escURL(\"hello world?\");\r\ndocument.body.appendChild(p27);\r\nconsole.log('escURL(\"hello world?\"): ' + escURL(\"hello world?\"));\r\n// Output:  \"hello%20world%3F\"\r\n\r\n// capitalize\r\nconst p28 = document.createElement('p');\r\np28.textContent = 'capitalize(\"hello WORLD\"): ' + capitalize(\"hello WORLD\");\r\ndocument.body.appendChild(p28);\r\nconsole.log('capitalize(\"hello WORLD\"): ' + capitalize(\"hello WORLD\"));\r\n// Output:  \"Hello world\"\r\n\r\nconst p000 = document.createElement('p');\r\np000.textContent = '=== 🧹 Array Utilities ===';\r\ndocument.body.appendChild(p000);\r\nconsole.log('=== 🧹 Array Utilities ===');\r\n\r\n// cleanArray\r\nconst p29 = document.createElement('p');\r\np29.textContent = 'cleanArray([1, null, \"hello\", undefined, \"\", 0]): ' + cleanArray([1, null, \"hello\", undefined, \"\", 0]);\r\ndocument.body.appendChild(p29);\r\nconsole.log('cleanArray([1, null, \"hello\", undefined, \"\", 0]): ' + cleanArray([1, null, \"hello\", undefined, \"\", 0]));\r\n// Output:  [1, \"hello\", 0] (Removes null, undefined, empty strings)\r\n\r\n// bubbleSortASC\r\nconst p30 = document.createElement('p');\r\np30.textContent = 'bubbleSortASC([3, 1, 4, 2]): ' + bubbleSortASC([3, 1, 4, 2]);\r\ndocument.body.appendChild(p30);\r\nconsole.log('bubbleSortASC([3, 1, 4, 2]): ' + bubbleSortASC([3, 1, 4, 2]));\r\n// Output:  [1, 2, 3, 4]\r\n\r\n// bubbleSortDESC\r\nconst p31 = document.createElement('p');\r\np31.textContent = 'bubbleSortDESC([3, 1, 4, 2]): ' + bubbleSortDESC([3, 1, 4, 2]);\r\ndocument.body.appendChild(p31);\r\nconsole.log('bubbleSortDESC([3, 1, 4, 2]): ' + bubbleSortDESC([3, 1, 4, 2]));\r\n// Output:  [4, 3, 2, 1]\r\n\r\n// mergeArrays\r\nconst p32 = document.createElement('p');\r\np32.textContent = 'mergeArrays([1, 2], [3, 4]): ' + mergeArrays([1, 2], [3, 4]);\r\ndocument.body.appendChild(p32);\r\nconsole.log('mergeArrays([1, 2], [3, 4]): ' + mergeArrays([1, 2], [3, 4]));\r\n// Output:  [1, 2, 3, 4]\r\n\r\n// arrayHasValue\r\nconst p33 = document.createElement('p');\r\np33.textContent = 'arrayHasValue([1, 2, 3], 2): ' + arrayHasValue([1, 2, 3], 2);\r\ndocument.body.appendChild(p33);\r\nconsole.log('arrayHasValue([1, 2, 3], 2): ' + arrayHasValue([1, 2, 3], 2));\r\n// Output:  true\r\n\r\n// arrayRemoveDuplicates\r\nconst p34 = document.createElement('p');\r\np34.textContent = 'arrayRemoveDuplicates([1, 2, 2, 3]): ' + arrayRemoveDuplicates([1, 2, 2, 3]);\r\ndocument.body.appendChild(p34);\r\nconsole.log('arrayRemoveDuplicates([1, 2, 2, 3]): ' + arrayRemoveDuplicates([1, 2, 2, 3]));\r\n// Output:  [1, 2, 3]\r\n\r\n// generateArray\r\nconst p35 = document.createElement('p');\r\np35.textContent = 'generateArray(1, 5, 1): ' + generateArray(1, 5, 1);\r\ndocument.body.appendChild(p35);\r\nconsole.log('generateArray(1, 5, 1): ' + generateArray(1, 5, 1));\r\n// Output:  [1, 2, 3, 4, 5]\r\n\r\n// cloneDeepArray\r\nconst originalArr = [{\"a\": 1}];\r\nconst clonedArr = cloneDeepArray(originalArr);\r\n\r\nconst p36 = document.createElement('p');\r\np36.textContent = 'cloneDeepArray check: ' + originalArr[0] !== clonedArr[0] + ' (Different references)';\r\ndocument.body.appendChild(p36);\r\nconsole.log('cloneDeepArray check: ' + originalArr[0] !== clonedArr[0] + ' (Different references)');\r\n// Output:  true (Different references)\r\n\r\nconst p0000 = document.createElement('p');\r\np0000.textContent = '=== 📦 Object Utilities ===';\r\ndocument.body.appendChild(p0000);\r\nconsole.log('=== 📦 Object Utilities ===');\r\n\r\n// safeJSONParse\r\nconst p37 = document.createElement('p');\r\np37.textContent = 'safeJSONParse({\"a\": 1}):' + safeJSONParse('{\"a\": 1}');\r\ndocument.body.appendChild(p37);\r\nconsole.log(\"safeJSONParse(/'{/'a/': 1}/'):\" + safeJSONParse('{\"a\": 1}'));\r\n\r\n// Output:   {a:  1}\r\nconst p38 = document.createElement('p');\r\np38.textContent = \"safeJSONParse('invalid'): \" + safeJSONParse('invalid');\r\ndocument.body.appendChild(p38);\r\nconsole.log(\"safeJSONParse('invalid'): \" + safeJSONParse('invalid'));\r\n// Output:  null (No error thrown)\r\n\r\n// mergeObjects\r\nconst p39 = document.createElement('p');\r\np39.textContent = 'mergeObjects({\"a\": 1}, {\"b\": 2}): ' + mergeObjects({\"a\": 1}, {\"b\": 2});\r\ndocument.body.appendChild(p39);\r\nconsole.log('mergeObjects({\"a\": 1}, {\"b\": 2}): ' + mergeObjects({\"a\": 1}, {\"b\": 2}));\r\n// Output:   {a:  1, b:  2}\r\n\r\n// cloneDeepObject\r\nconst originalObj = {\"x\": {\"y\": 1}};\r\nconst clonedObj = cloneDeepObject(originalObj);\r\n\r\nconst p40 = document.createElement('p');\r\np40.textContent = 'cloneDeepObject check: ' + originalObj.x !== clonedObj.x + ' (Different references)';\r\ndocument.body.appendChild(p40);\r\n\r\nconsole.log('cloneDeepObject check: ' + originalObj.x !== clonedObj.x + ' (Different references)');\r\n// Output:  true (Different references)\r\n\r\n// objectHasKey\r\nconst p41 = document.createElement('p');\r\np41.textContent = 'objectHasKey({\"a\": 1}, \"a\"): ' + objectHasKey({\"a\": 1}, \"a\");\r\ndocument.body.appendChild(p41);\r\nconsole.log('objectHasKey({\"a\": 1}, \"a\"): ' + objectHasKey({\"a\": 1}, \"a\"));\r\n// Output:  true\r\n\r\n// objectHasValue\r\nconst p42 = document.createElement('p');\r\np42.textContent = 'objectHasValue({\"a\": 1}, 1): ' + objectHasValue({\"a\": 1}, 1);\r\ndocument.body.appendChild(p42);\r\nconsole.log('objectHasValue({\"a\": 1}, 1): ' + objectHasValue({\"a\": 1}, 1));\r\n// Output:  true\r\n\r\nconst p00000 = document.createElement('p');\r\np00000.textContent = '=== 📅 Date & Time Utilities ===';\r\ndocument.body.appendChild(p00000);\r\nconsole.log('=== 📅 Date & Time Utilities ===');\r\n\r\nconst today = \"Jan, 01, 2026\";\r\nconst p111111 = document.createElement('p');\r\np111111.textContent = 'today: ' + today;\r\ndocument.body.appendChild(p111111);\r\n\r\n// NOTE:  Ensure isStringAValidDate is exported in index.js if using it externally\r\nif(isStringAValidDate) {\r\n\tconst p43 = document.createElement('p');\r\n\tp43.textContent = 'isStringAValidDate(\"2023-01-01\"): ' + isStringAValidDate(\"2023-01-01\");\r\n\tdocument.body.appendChild(p43);\r\n\tconsole.log('isStringAValidDate(\"2023-01-01\"): ' + isStringAValidDate(\"2023-01-01\"));\r\n}\r\n// Output:  true\r\n\r\n\r\n// isSameDayName\r\nconst nextWeek = \"Jan, 08, 2026\";\r\nconst p1111111 = document.createElement('p');\r\np1111111.textContent = 'nextWeek: ' + nextWeek;\r\ndocument.body.appendChild(p1111111);\r\n\r\n\r\nconst p44 = document.createElement('p');\r\np44.textContent = 'isSameDayName(\"01/01/2026\", \"Jan, 08, 2026\"): ' + isSameDayName(today, nextWeek);\r\ndocument.body.appendChild(p44);\r\nconsole.log('isSameDayName(\"01/01/2026\", \"Jan, 08, 2026\"): ' + isSameDayName(today, nextWeek));\r\n// Output:  true (e.g., both are Thursday)\r\n\r\n// shortDayName \r\nconst p45 = document.createElement('p');\r\np45.textContent = 'shortDayName(today): ' + shortDayName(today);\r\ndocument.body.appendChild(p45);\r\nconsole.log('shortDayName(today): ' + shortDayName(today)); // Output:  e.g., \"Mon\"\r\n\r\n// fullDayName\r\nconst p46 = document.createElement('p');\r\np46.textContent = 'fullDayName(today): ' + fullDayName(today);\r\ndocument.body.appendChild(p46);\r\nconsole.log('fullDayName(today): ' + fullDayName(today)); // Output:  e.g., \"Monday\"\r\n\r\n// shortMonthName \r\nconst p47 = document.createElement('p');\r\np47.textContent = 'shortMonthName(1): ' + shortMonthName(1);\r\ndocument.body.appendChild(p47);\r\nconsole.log('shortMonthName(1): ' + shortMonthName(1)); // Output:  \"Jan\"\r\n\r\n// fullMonthName\r\nconst p48 = document.createElement('p');\r\np48.textContent = 'fullMonthName(1): ' + fullMonthName(1);\r\ndocument.body.appendChild(p48);\r\nconsole.log('fullMonthName(1): ' + fullMonthName(1)); // Output:  \"January\"\r\n\r\n// SeasonName\r\nconst p49 = document.createElement('p');\r\np49.textContent = 'SeasonName(today): ' + SeasonName(today);\r\ndocument.body.appendChild(p49);\r\nconsole.log('SeasonName(today): ' + SeasonName(today));\r\n// Output:  e.g., \"Autumn\"\r\n\r\n// formatNumericDate\r\nconst p50 = document.createElement('p');\r\np50.textContent = 'formatNumericDate(today, \"DD/MM/YYYY\"): ' + formatNumericDate(today, \"DD/MM/YYYY\");\r\ndocument.body.appendChild(p50);\r\nconsole.log('formatNumericDate(today, \"DD/MM/YYYY\"): ' + formatNumericDate(today, \"DD/MM/YYYY\"));\r\n// Output:  e.g., \"26/11/2024\"\r\n\r\n// formatShortNamedDate\r\nconst p51 = document.createElement('p');\r\np51.textContent = 'formatShortNamedDate(today): ' + formatShortNamedDate(today);\r\ndocument.body.appendChild(p51);\r\nconsole.log('formatShortNamedDate(today): ' + formatShortNamedDate(today));\r\n// Output:  e.g., \"Nov 26, 2024\"\r\n\r\n// formatFullNamedDate\r\nconst p52 = document.createElement('p');\r\np52.textContent = 'formatFullNamedDate(today): ' + formatFullNamedDate(today);\r\ndocument.body.appendChild(p52);\r\nconsole.log('formatFullNamedDate(today): ' + formatFullNamedDate(today));\r\n// Output:  e.g., \"November 26, 2024\"\r\n\r\n// formatTime24\r\nconst p53 = document.createElement('p');\r\np53.textContent = 'formatTime24(today): ', formatTime24(today);\r\ndocument.body.appendChild(p53);\r\nconsole.log('formatTime24(today): ', formatTime24(today));\r\n// Output:  e.g., \"14: 30: 05\"\r\n\r\n// formatTime12\r\nconst p54 = document.createElement('p');\r\np54.textContent = 'formatTime12(today): ' + formatTime12(today);\r\ndocument.body.appendChild(p54);\r\nconsole.log('formatTime12(today): ' + formatTime12(today));\r\n// Output:  e.g., \"02: 30: 05 PM\"\r\n\r\n// Time Math\r\nconst p55 = document.createElement('p');\r\np55.textContent = 'addDays(today, 5): ' + addDays(today, 5);\r\ndocument.body.appendChild(p55);\r\nconsole.log('addDays(today, 5): ' + addDays(today, 5));\r\n// Output:  Date 5 days from now\r\n\r\nconst p56 = document.createElement('p');\r\np56.textContent = 'subtractYears(today, 1): ' + subtractYears(today, 1);\r\ndocument.body.appendChild(p56);\r\nconsole.log('subtractYears(today, 1): ' + subtractYears(today, 1));\r\n// Output:  Date 1 year ago\r\n\r\n// Special Days\r\nconst p57 = document.createElement('p');\r\np57.textContent = 'isSatOrSun(today): ' + isSatOrSun(today);\r\ndocument.body.appendChild(p57);\r\nconsole.log('isSatOrSun(today): ' + isSatOrSun(today)); // Boolean\r\n\r\nconst xmas = \"Dec 25\"; // Dec 25\r\n\r\nconst p58 = document.createElement('p');\r\np58.textContent = 'isChristmas(xmas): ' + isChristmas(xmas);\r\ndocument.body.appendChild(p58);\r\nconsole.log('isChristmas(xmas): ' + isChristmas(xmas)); // Output:  true\r\n\r\n// Thanksgiving 2026 Test\r\n// In 2026, November 1st is a Sunday. The 4th Thursday is Nov 26th.\r\nconst thanksgiving2026 = \"Nov 26, 2026\";\r\n\r\nconst p59 = document.createElement('p');\r\np59.textContent = 'isThanksGiving(Nov 26, 2026): ' + isThanksGiving(thanksgiving2026);\r\ndocument.body.appendChild(p59);\r\nconsole.log('isThanksGiving(Nov 26, 2026): ' + isThanksGiving(thanksgiving2026));\r\n// Output:  true\r\n\r\n// New Year Test\r\nconst newYear = \"Jan 1, 2026\"; // Jan 1st\r\n\r\nconst p60 = document.createElement('p');\r\np60.textContent = 'isNewYear(Jan 1, 2026): ' + isNewYear(newYear);\r\ndocument.body.appendChild(p60);\r\nconsole.log('isNewYear(Jan 1, 2026): ' + isNewYear(newYear));\r\n// Output:  true\r\n\r\n// Western Easter Test (2026:  April 5)\r\nconst westernEaster = \"Apr 5, 2026\";\r\n\r\nconst p61 = document.createElement('p');\r\np61.textContent = 'isWesternEaster(Apr 5, 2026): ' + isWesternEaster(westernEaster);\r\ndocument.body.appendChild(p61);\r\nconsole.log('isWesternEaster(Apr 5, 2026): ' + isWesternEaster(westernEaster));\r\n// Output:  true\r\n\r\n// Eastern Easter Test (2026:  April 12)\r\nconst easternEaster = \"Apr 12, 2026\";\r\n\r\nconst p62 = document.createElement('p');\r\np62.textContent = 'isEasternEaster(Apr 5, 2026): ' + isEasternEaster(easternEaster);\r\ndocument.body.appendChild(p62);\r\nconsole.log('isEasternEaster(Apr 12, 2026): ' + isEasternEaster(easternEaster));\r\n// Output:  true\r\n\r\nconst p000000 = document.createElement('p');\r\np000000.textContent = '=== 📱 Devices Recognition Utilities ===';\r\ndocument.body.appendChild(p000000);\r\nconsole.log('=== 📱 Devices Recognition Utilities ===');\r\n// NOTE:  These tests rely on global browser objects (window, navigator) and will likely return 'false' or 'null' if run in a pure Node.js environment.\r\n\r\nconst p63 = document.createElement('p');\r\np63.textContent = 'isMobile(): ' + isMobile();\r\ndocument.body.appendChild(p63);\r\nconsole.log('isMobile(): ' + isMobile());\r\n// Output:  true (if running on a mobile device) or false (if running on desktop/node)\r\n\r\nconst p64 = document.createElement('p');\r\np64.textContent = 'isAndroidMobile(): ' + isAndroidMobile();\r\ndocument.body.appendChild(p64);\r\nconsole.log('isAndroidMobile(): ' + isAndroidMobile());\r\n// Output:  true (if running on an Android mobile phone) or false\r\n\r\nconst p65 = document.createElement('p');\r\np65.textContent = 'isHuaweiMobile(): ' + isHuaweiMobile();\r\ndocument.body.appendChild(p65);\r\nconsole.log('isHuaweiMobile(): ' + isHuaweiMobile());\r\n// Output:  true (if running on a Huawei mobile phone) or false\r\n\r\nconst p66 = document.createElement('p');\r\np66.textContent = 'isIPhone(): ' + isIPhone();\r\ndocument.body.appendChild(p66);\r\nconsole.log('isIPhone(): ' + isIPhone());\r\n// Output:  true (if running on an iPhone) or false\r\n\r\nconst p67 = document.createElement('p');\r\np67.textContent = 'isMobileLandscape(): ' + isMobileLandscape();\r\ndocument.body.appendChild(p67);\r\nconsole.log('isMobileLandscape(): ' + isMobileLandscape());\r\n// Output:  true (if mobile and width > height) or false\r\n\r\nconst p68 = document.createElement('p');\r\np68.textContent = 'isMobilePortrait(): ' + isMobilePortrait();\r\ndocument.body.appendChild(p68);\r\nconsole.log('isMobilePortrait(): ' + isMobilePortrait());\r\n// Output:  true (if mobile and width <= height) or false\r\n\r\nconst p69 = document.createElement('p');\r\np69.textContent = 'isTablet(): ' + isTablet();\r\ndocument.body.appendChild(p69);\r\nconsole.log('isTablet(): ' + isTablet());\r\n// Output:  true (if running on a tablet device) or false\r\n\r\nconst p70 = document.createElement('p');\r\np70.textContent = 'isAndroidTablet(): ' + isAndroidTablet();\r\ndocument.body.appendChild(p70);\r\nconsole.log('isAndroidTablet(): ' + isAndroidTablet());\r\n// Output:  true (if running on an Android tablet) or false\r\n\r\nconst p71 = document.createElement('p');\r\np71.textContent = 'isHuaweiTablet(): ' + isHuaweiTablet();\r\ndocument.body.appendChild(p71);\r\nconsole.log('isHuaweiTablet(): ' + isHuaweiTablet());\r\n// Output:  true (if running on a Huawei tablet) or false\r\n\r\nconst p72 = document.createElement('p');\r\np72.textContent = 'isIPad(): ' + isIPad();\r\ndocument.body.appendChild(p72);\r\nconsole.log('isIPad(): ' + isIPad());\r\n// Output:  true (if running on an iPad) or false\r\n\r\nconst p73 = document.createElement('p');\r\np73.textContent = 'isTabletLandscape(): ' + isTabletLandscape();\r\ndocument.body.appendChild(p73);\r\nconsole.log('isTabletLandscape(): ' + isTabletLandscape());\r\n// Output:  true (if tablet and width > height) or false\r\n\r\nconst p74 = document.createElement('p');\r\np74.textContent = 'isTabletPortrait(): ' + isTabletPortrait();\r\ndocument.body.appendChild(p74);\r\nconsole.log('isTabletPortrait(): ' + isTabletPortrait());\r\n// Output:  true (if tablet and width <= height) or false\r\n\r\nconst p75 = document.createElement('p');\r\np75.textContent = 'isDesktop(): ' + isDesktop();\r\ndocument.body.appendChild(p75);\r\nconsole.log('isDesktop(): ' + isDesktop());\r\n// Output:  true (if not mobile and not tablet) or false\r\n\r\nconst p76 = document.createElement('p');\r\np76.textContent = 'isIOS(): ' + isIOS();\r\ndocument.body.appendChild(p76);\r\nconsole.log('isIOS(): ' + isIOS());\r\n// Output:  true (if running on iOS/iPadOS) or false\r\n\r\nconst p77 = document.createElement('p');\r\np77.textContent = 'isMacOS(): ' + isMacOS();\r\ndocument.body.appendChild(p77);\r\nconsole.log('isMacOS(): ' + isMacOS());\r\n// Output:  true (if running on macOS) or false\r\n\r\nconst p78 = document.createElement('p');\r\np78.textContent = 'isWindows(): ' + isWindows();\r\ndocument.body.appendChild(p78);\r\nconsole.log('isWindows(): ' + isWindows());\r\n// Output:  true (if running on Windows OS) or false\r\n\r\nconst p79 = document.createElement('p');\r\np79.textContent = 'isWindows7(): ' + isWindows7();\r\ndocument.body.appendChild(p79);\r\nconsole.log('isWindows7(): ' + isWindows7());\r\n// Output:  true (if running on Windows 7) or false\r\n\r\nconst p80 = document.createElement('p');\r\np80.textContent = 'isWindows10(): ' + isWindows10();\r\ndocument.body.appendChild(p80);\r\nconsole.log('isWindows10(): ' + isWindows10());\r\n// Output:  true (if running on Windows 10) or false\r\n\r\nconst p81 = document.createElement('p');\r\np81.textContent = 'isWindows11(): ' + isWindows11() + ' Note:  relies on Win 10 UA string)';\r\ndocument.body.appendChild(p81);\r\nconsole.log('isWindows11(): ' + isWindows11());\r\n// Output:  true (if running on Windows 11 - Note:  relies on Win 10 UA string) or false\r\n\r\nconst p82 = document.createElement('p');\r\np82.textContent = 'isLinux(): ' + isLinux();\r\ndocument.body.appendChild(p82);\r\nconsole.log('isLinux(): ' + isLinux());\r\n// Output:  true (if running on Linux) or false\r\n\r\nconst p0000000 = document.createElement('p');\r\np0000000.textContent = '=== 🌐 Browsers Recognition Utilities ===';\r\ndocument.body.appendChild(p0000000);\r\nconsole.log('=== 🌐 Browsers Recognition Utilities ===');\r\n// NOTE:  These tests rely on global browser objects (navigator) and will likely return 'false' if run in a pure Node.js environment.\r\n\r\nconst p83 = document.createElement('p');\r\np83.textContent = 'isWebkit(): ' + isWebkit();\r\ndocument.body.appendChild(p83);\r\nconsole.log('isWebkit(): ' + isWebkit());\r\n// Output:  true (if browser uses WebKit engine) or false\r\n\r\nconst p84 = document.createElement('p');\r\np84.textContent = 'isChrome(): ' + isChrome();\r\ndocument.body.appendChild(p84);\r\nconsole.log('isChrome(): ' + isChrome());\r\n// Output:  true (if browser is Google Chrome) or false\r\n\r\nconst p85 = document.createElement('p');\r\np85.textContent = 'isEdge(): ' + isEdge();\r\ndocument.body.appendChild(p85);\r\nconsole.log('isEdge(): ' + isEdge());\r\n// Output:  true (if browser is Microsoft Edge) or false\r\n\r\nconst p86 = document.createElement('p');\r\np86.textContent = 'isFirefox(): ' + isFirefox();\r\ndocument.body.appendChild(p86);\r\nconsole.log('isFirefox(): ' + isFirefox());\r\n// Output:  true (if browser is Mozilla Firefox) or false\r\n\r\nconst p87 = document.createElement('p');\r\np87.textContent = 'isOprea(): ' + isOprea();\r\ndocument.body.appendChild(p87);\r\nconsole.log('isOprea(): ' + isOprea());\r\n// Output:  true (if browser is Opera) or false\r\n\r\nconst p88 = document.createElement('p');\r\np88.textContent = 'isBrave(): ' + isBrave();\r\ndocument.body.appendChild(p88);\r\nconsole.log('isBrave(): ' + isBrave());\r\n// Output:  true (if browser is Brave) or false\r\n\r\nconst p89 = document.createElement('p');\r\np89.textContent = 'isInternetExplorer(): ' + isInternetExplorer();\r\ndocument.body.appendChild(p89);\r\nconsole.log('isInternetExplorer(): ' + isInternetExplorer());\r\n// Output:  true (if browser is IE 11 or older) or false\r\n\r\nconst p00000000 = document.createElement('p');\r\np00000000.textContent = '=== 🛠️ Helper Utilities ===';\r\ndocument.body.appendChild(p00000000);\r\nconsole.log('=== 🛠️ Helper Utilities ===');\r\n\r\n// fahrenheitToCelsius\r\nconst p90 = document.createElement('p');\r\np90.textContent = 'fahrenheitToCelsius(32): ' + fahrenheitToCelsius(32);\r\ndocument.body.appendChild(p90);\r\nconsole.log('fahrenheitToCelsius(32): ' + fahrenheitToCelsius(32));\r\n// Output:  0\r\n\r\n// celsiusToFahrenheit\r\nconst p91 = document.createElement('p');\r\np91.textContent = 'celsiusToFahrenheit(0): ' + celsiusToFahrenheit(0);\r\ndocument.body.appendChild(p91);\r\nconsole.log('celsiusToFahrenheit(0): ' + celsiusToFahrenheit(0));\r\n// Output:  32\r\n\r\n// delay\r\nconst p92 = document.createElement('p');\r\nfunction print() {\r\n\tp92.textContent = \"delay:  Waiting 3 seconds...Then Print \" + sum(10, 20, 5, 5);\r\n}\r\ndelay(print, 3000);\r\ndocument.body.appendChild(p92);\r\n//console.log(\"delay:  Waiting 3 seconds...Then Print \" + delay(print, 3000));\r\n\r\n```\r\n\r\n## 🌍 Roadmap\r\n- Add TypeScript Support.\r\n- Add More Utilities Functions.\r\n- Improve Documentation.\r\n\r\n## 🤝 Contributing\r\nContributions are always welcome!\r\nPlease send me an email.\r\n\r\n## 📄 License\r\nThis Project Is Licensed Under The MIT License.\r\nSee The license.txt File For Details.\r\n\r\n## ❤️ Support\r\nIf You Like This Package, Buy Me A Coffee!\r\n#### ✔ url: https://paypal.me/emadzedanpaypal","readmeFilename":"README.md"}