@unicom-cloud/utils 0.1.34 → 0.1.36

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.
Files changed (335) hide show
  1. package/assert/index.js +41 -0
  2. package/assert.js +9 -0
  3. package/case-name/index.js +1 -1
  4. package/caseName.js +1 -1
  5. package/class-name/index.js +1 -1
  6. package/className.js +1 -1
  7. package/clipboard-copy/index.js +1 -1
  8. package/clipboardCopy.js +1 -1
  9. package/constant/address.js +1 -1
  10. package/constant/chineseCharacters.js +1 -1
  11. package/constant/constellations.js +1 -1
  12. package/constant/domain.js +1 -1
  13. package/constant/identity.js +1 -1
  14. package/constant/index.js +19 -21
  15. package/constant/isMobile.js +1 -1
  16. package/constant/keyboardCode.js +1 -1
  17. package/constant/licensePlate.js +1 -1
  18. package/constant/name.js +1 -1
  19. package/constant/platform.js +1 -1
  20. package/constant/protocol.js +1 -1
  21. package/constant/string.js +1 -1
  22. package/constant/ui.js +1 -1
  23. package/constant.js +17 -19
  24. package/content-disposition/index.js +1 -1
  25. package/contentDisposition.js +1 -1
  26. package/cookie/index.js +1 -1
  27. package/cookie/src/api.js +1 -1
  28. package/cookie/src/assign.js +1 -1
  29. package/cookie/src/converter.js +1 -1
  30. package/cookie.js +1 -1
  31. package/date/convertTime.js +1 -1
  32. package/date/convertToDuration.js +1 -1
  33. package/date/index.js +1 -1
  34. package/date.js +1 -1
  35. package/decimal/decimal.js +1 -1
  36. package/decimal/index.js +1 -1
  37. package/decimal.js +1 -1
  38. package/dom-helpers/activeElement.js +1 -1
  39. package/dom-helpers/addClass.js +1 -1
  40. package/dom-helpers/addEventListener.js +1 -1
  41. package/dom-helpers/animate.js +1 -1
  42. package/dom-helpers/animationFrame.js +1 -1
  43. package/dom-helpers/attribute.js +1 -1
  44. package/dom-helpers/camelize.js +1 -1
  45. package/dom-helpers/camelizeStyle.js +1 -1
  46. package/dom-helpers/canUseDOM.js +1 -1
  47. package/dom-helpers/childElements.js +1 -1
  48. package/dom-helpers/childNodes.js +1 -1
  49. package/dom-helpers/clear.js +1 -1
  50. package/dom-helpers/closest.js +1 -1
  51. package/dom-helpers/collectElements.js +1 -1
  52. package/dom-helpers/collectSiblings.js +1 -1
  53. package/dom-helpers/contains.js +1 -1
  54. package/dom-helpers/css.js +1 -1
  55. package/dom-helpers/filterEventHandler.js +1 -1
  56. package/dom-helpers/getComputedStyle.js +1 -1
  57. package/dom-helpers/getElementCoordinates.js +1 -1
  58. package/dom-helpers/getScrollAccessor.js +1 -1
  59. package/dom-helpers/hasClass.js +1 -1
  60. package/dom-helpers/height.js +1 -1
  61. package/dom-helpers/hyphenate.js +1 -1
  62. package/dom-helpers/hyphenateStyle.js +1 -1
  63. package/dom-helpers/index.js +1 -1
  64. package/dom-helpers/insertAfter.js +1 -1
  65. package/dom-helpers/isDocument.js +1 -1
  66. package/dom-helpers/isInput.js +1 -1
  67. package/dom-helpers/isTransform.js +1 -1
  68. package/dom-helpers/isVisible.js +1 -1
  69. package/dom-helpers/isWindow.js +1 -1
  70. package/dom-helpers/listen.js +1 -1
  71. package/dom-helpers/matches.js +1 -1
  72. package/dom-helpers/nextUntil.js +1 -1
  73. package/dom-helpers/offset.js +1 -1
  74. package/dom-helpers/offsetParent.js +1 -1
  75. package/dom-helpers/ownerDocument.js +1 -1
  76. package/dom-helpers/ownerWindow.js +1 -1
  77. package/dom-helpers/parents.js +1 -1
  78. package/dom-helpers/position.js +1 -1
  79. package/dom-helpers/prepend.js +1 -1
  80. package/dom-helpers/querySelectorAll.js +1 -1
  81. package/dom-helpers/reflow.js +1 -1
  82. package/dom-helpers/remove.js +1 -1
  83. package/dom-helpers/removeClass.js +1 -1
  84. package/dom-helpers/removeEventListener.js +1 -1
  85. package/dom-helpers/scrollLeft.js +1 -1
  86. package/dom-helpers/scrollParent.js +1 -1
  87. package/dom-helpers/scrollTo.js +1 -1
  88. package/dom-helpers/scrollTop.js +1 -1
  89. package/dom-helpers/scrollbarSize.js +1 -1
  90. package/dom-helpers/siblings.js +1 -1
  91. package/dom-helpers/text.js +1 -1
  92. package/dom-helpers/toggleClass.js +1 -1
  93. package/dom-helpers/transitionEnd.js +1 -1
  94. package/dom-helpers/triggerEvent.js +1 -1
  95. package/dom-helpers/types.js +1 -1
  96. package/dom-helpers/width.js +1 -1
  97. package/domHelpers.js +1 -1
  98. package/emitter/index.js +1 -1
  99. package/emitter/src/index.js +18 -18
  100. package/emitter.js +1 -1
  101. package/emoji/emoji.js +52077 -0
  102. package/emoji/emojis.js +1920 -0
  103. package/emoji/index.js +35 -0
  104. package/emoji.js +11 -0
  105. package/escape/index.js +1 -1
  106. package/escape.js +1 -1
  107. package/file/fileRead.js +55 -0
  108. package/file/fileToDataURL.js +9 -0
  109. package/file/index.js +5 -3
  110. package/file/saveAs.js +38 -30
  111. package/file.js +5 -3
  112. package/function/index.js +5 -4
  113. package/function.js +5 -4
  114. package/idb/index.js +1 -1
  115. package/idb.js +1 -1
  116. package/index.js +1 -1
  117. package/invariant/index.js +1 -1
  118. package/invariant.js +1 -1
  119. package/is/index.js +201 -198
  120. package/is/lib/isAscii.js +6 -6
  121. package/is/lib/isBase64.js +5 -5
  122. package/is/lib/isChinese.js +1 -1
  123. package/is/lib/isDataURI.js +11 -11
  124. package/is/lib/isEmail.js +25 -25
  125. package/is/lib/isFQDN.js +7 -7
  126. package/is/lib/isFullWidth.js +5 -5
  127. package/is/lib/isHSL.js +5 -5
  128. package/is/lib/isHalfWidth.js +5 -5
  129. package/is/lib/isHash.js +5 -5
  130. package/is/lib/isHexColor.js +7 -7
  131. package/is/lib/isIMEI.js +7 -7
  132. package/is/lib/isIP.js +12 -12
  133. package/is/lib/isIPRange.js +8 -8
  134. package/is/lib/isIdentityCard.js +12 -12
  135. package/is/lib/isJWT.js +9 -9
  136. package/is/lib/isMACAddress.js +6 -6
  137. package/is/lib/isMD5.js +4 -4
  138. package/is/lib/isMimeType.js +4 -4
  139. package/is/lib/isMobilePhone.js +3 -3
  140. package/is/lib/isPort.js +1 -1
  141. package/is/lib/isRgbColor.js +8 -8
  142. package/is/lib/isSemVer.js +5 -5
  143. package/is/lib/isSlug.js +6 -6
  144. package/is/lib/isStrongPassword.js +8 -8
  145. package/is/lib/isURL.js +32 -32
  146. package/is/lib/isUUID.js +5 -5
  147. package/is/lib/isVariableWidth.js +7 -7
  148. package/is.js +78 -76
  149. package/lunar/index.js +1 -1
  150. package/lunar/lib/Holiday.js +1 -1
  151. package/lunar/lib/HolidayUtil.js +1 -1
  152. package/lunar/lib/I18n.js +1 -1
  153. package/lunar/lib/JieQi.js +1 -1
  154. package/lunar/lib/Lunar.js +1 -1
  155. package/lunar/lib/LunarMonth.js +1 -1
  156. package/lunar/lib/LunarTime.js +1 -1
  157. package/lunar/lib/LunarUtil.js +1 -1
  158. package/lunar/lib/LunarYear.js +1 -1
  159. package/lunar/lib/ShouXingUtil.js +1 -1
  160. package/lunar/lib/Solar.js +1 -1
  161. package/lunar/lib/SolarHalfYear.js +1 -1
  162. package/lunar/lib/SolarMonth.js +1 -1
  163. package/lunar/lib/SolarSeason.js +1 -1
  164. package/lunar/lib/SolarUtil.js +1 -1
  165. package/lunar/lib/SolarWeek.js +1 -1
  166. package/lunar/lib/SolarYear.js +1 -1
  167. package/lunar/lib/index.js +1 -1
  168. package/lunar.js +1 -1
  169. package/math/index.js +1 -1
  170. package/math.js +1 -1
  171. package/md5/index.js +1 -1
  172. package/md5.js +1 -1
  173. package/mock/MockWebSocket.js +1 -1
  174. package/mock/MockXMLHttpRequest.js +1 -1
  175. package/mock/index.js +1 -1
  176. package/mock.js +1 -1
  177. package/normalize-wheel/ExecutionEnvironment.js +1 -1
  178. package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
  179. package/normalize-wheel/index.js +1 -1
  180. package/normalize-wheel/isEventSupported.js +1 -1
  181. package/normalizeWheel.js +1 -1
  182. package/number-to-chinese/index.js +1 -1
  183. package/numberToChinese.js +1 -1
  184. package/nzh/cn.js +1 -1
  185. package/nzh/hk.js +1 -1
  186. package/nzh/index.js +1 -1
  187. package/nzh/nzh.js +1 -1
  188. package/nzh/src/autoGet.js +1 -1
  189. package/nzh/src/index.js +1 -1
  190. package/nzh/src/langs/cn_b.js +1 -1
  191. package/nzh/src/langs/cn_s.js +1 -1
  192. package/nzh/src/langs/hk_b.js +1 -1
  193. package/nzh/src/langs/hk_s.js +1 -1
  194. package/nzh/src/utils.js +1 -1
  195. package/nzh.js +1 -1
  196. package/object/index.js +18 -0
  197. package/object.js +8 -0
  198. package/package.json +1 -1
  199. package/pinyin/index.js +1 -1
  200. package/pinyin/simplified.js +1 -1
  201. package/pinyin/src/core.js +1 -1
  202. package/pinyin/src/simplified.js +1 -1
  203. package/pinyin/src/simplified_dict.js +1 -1
  204. package/pinyin/src/traditional.js +1 -1
  205. package/pinyin/src/traditional_dict.js +1 -1
  206. package/pinyin/traditional.js +1 -1
  207. package/pinyin.js +1 -1
  208. package/query-string/base.js +2 -2
  209. package/query-string/index.js +1 -1
  210. package/query-string/splitOnFirst.js +1 -1
  211. package/queryString.js +1 -1
  212. package/random/address.js +1 -1
  213. package/random/constellation.js +1 -1
  214. package/random/image.js +1 -1
  215. package/random/index.js +1 -1
  216. package/random/licensePlate.js +1 -1
  217. package/random/name.js +1 -1
  218. package/random/number.js +1 -1
  219. package/random/text.js +1 -1
  220. package/random/time.js +1 -1
  221. package/random/web.js +1 -1
  222. package/random.js +1 -1
  223. package/screenfull/index.js +1 -1
  224. package/screenfull.js +1 -1
  225. package/sleep/index.js +1 -1
  226. package/sleep.js +1 -1
  227. package/snapdom/index.js +1 -1
  228. package/snapdom/src/api/preCache.js +1 -1
  229. package/snapdom/src/api/snapdom.js +2 -2
  230. package/snapdom/src/core/cache.js +1 -1
  231. package/snapdom/src/core/capture.js +1 -1
  232. package/snapdom/src/core/clone.js +1 -1
  233. package/snapdom/src/core/context.js +1 -1
  234. package/snapdom/src/core/plugins.js +1 -1
  235. package/snapdom/src/core/prepare.js +1 -1
  236. package/snapdom/src/exporters/download.js +1 -1
  237. package/snapdom/src/exporters/toBlob.js +1 -1
  238. package/snapdom/src/exporters/toCanvas.js +1 -1
  239. package/snapdom/src/exporters/toImg.js +1 -1
  240. package/snapdom/src/modules/CSSVar.js +1 -1
  241. package/snapdom/src/modules/background.js +1 -1
  242. package/snapdom/src/modules/changeCSS.js +1 -1
  243. package/snapdom/src/modules/counter.js +1 -1
  244. package/snapdom/src/modules/fonts.js +2 -2
  245. package/snapdom/src/modules/iconFonts.js +1 -1
  246. package/snapdom/src/modules/images.js +1 -1
  247. package/snapdom/src/modules/lineClamp.js +1 -1
  248. package/snapdom/src/modules/pseudo.js +1 -1
  249. package/snapdom/src/modules/rasterize.js +1 -1
  250. package/snapdom/src/modules/snapFetch.js +1 -1
  251. package/snapdom/src/modules/styles.js +1 -1
  252. package/snapdom/src/modules/svgDefs.js +1 -1
  253. package/snapdom/src/utils/browser.js +1 -1
  254. package/snapdom/src/utils/capture.helpers.js +1 -1
  255. package/snapdom/src/utils/clone.helpers.js +1 -1
  256. package/snapdom/src/utils/css.js +1 -1
  257. package/snapdom/src/utils/helpers.js +1 -1
  258. package/snapdom/src/utils/image.js +1 -1
  259. package/snapdom/src/utils/prepare.helpers.js +1 -1
  260. package/snapdom/src/utils/transforms.helpers.js +1 -1
  261. package/snapdom.js +1 -1
  262. package/string/chars.js +660 -0
  263. package/string/index.js +1 -1
  264. package/string.js +1 -1
  265. package/tinycolor/index.js +1 -1
  266. package/tinycolor/src/conversion.js +1 -1
  267. package/tinycolor/src/css-color-names.js +1 -1
  268. package/tinycolor/src/format-input.js +1 -1
  269. package/tinycolor/src/from-ratio.js +1 -1
  270. package/tinycolor/src/index.js +1 -1
  271. package/tinycolor/src/random.js +1 -1
  272. package/tinycolor/src/readability.js +1 -1
  273. package/tinycolor/src/to-ms-filter.js +1 -1
  274. package/tinycolor/src/utils.js +1 -1
  275. package/tinycolor.js +1 -1
  276. package/tree/index.js +1 -1
  277. package/tree/search/index.js +1 -1
  278. package/tree.js +1 -1
  279. package/tween/index.js +1 -1
  280. package/tween/src/easing.js +1 -1
  281. package/tween/src/tween.js +1 -1
  282. package/tween.js +1 -1
  283. package/types/assert/index.d.ts +8 -0
  284. package/types/constant/index.d.ts +0 -1
  285. package/types/emoji/emoji.d.ts +196 -0
  286. package/types/emoji/emojis.d.ts +2 -0
  287. package/types/{constant/emoji.d.ts → emoji/index.d.ts} +4 -0
  288. package/types/file/fileRead.d.ts +11 -0
  289. package/types/file/fileToDataURL.d.ts +3 -0
  290. package/types/file/index.d.ts +3 -2
  291. package/types/file/saveAs.d.ts +2 -1
  292. package/types/is/index.d.ts +18 -16
  293. package/types/is/lib/isIP.d.ts +1 -1
  294. package/types/is/lib/isURL.d.ts +1 -1
  295. package/types/lodash/isPromise.d.ts +1 -1
  296. package/types/normalize-wheel/index.d.ts +1 -1
  297. package/types/object/index.d.ts +5 -0
  298. package/types/snapdom/src/api/preCache.d.ts +1 -1
  299. package/types/string/chars.d.ts +2 -0
  300. package/ui-color/compareColorByRange.js +1 -1
  301. package/ui-color/index.js +1 -1
  302. package/uiColor.js +1 -1
  303. package/url-toolkit/index.js +1 -1
  304. package/url-toolkit/src/url-toolkit.js +1 -1
  305. package/urlToolkit.js +1 -1
  306. package/validate/index.js +1 -1
  307. package/validate/src/index.js +5 -4
  308. package/validate/src/locale/en-US.js +1 -1
  309. package/validate/src/locale/index.js +1 -1
  310. package/validate/src/locale/zh-CN.js +1 -1
  311. package/validate/src/rules/array.js +1 -1
  312. package/validate/src/rules/base.js +1 -1
  313. package/validate/src/rules/boolean.js +1 -1
  314. package/validate/src/rules/custom.js +1 -1
  315. package/validate/src/rules/number.js +1 -1
  316. package/validate/src/rules/object.js +1 -1
  317. package/validate/src/rules/string.js +1 -1
  318. package/validate/src/rules/type.js +1 -1
  319. package/validate.js +1 -1
  320. package/version/index.js +1 -1
  321. package/version.js +1 -1
  322. package/xlsx/index.js +1 -1
  323. package/xlsx/xlsx.js +30 -77
  324. package/xlsx.js +1 -1
  325. package/constant/emoji.js +0 -32
  326. package/file/fileToURL.js +0 -18
  327. package/is/lib/util/assertString.js +0 -12
  328. package/object-keys-sort/index.js +0 -8
  329. package/object-prototype-to-string-call/index.js +0 -9
  330. package/objectKeysSort.js +0 -5
  331. package/objectPrototypeToStringCall.js +0 -6
  332. package/types/file/fileToURL.d.ts +0 -2
  333. package/types/is/lib/util/assertString.d.ts +0 -1
  334. package/types/object-keys-sort/index.d.ts +0 -4
  335. package/types/object-prototype-to-string-call/index.d.ts +0 -2
package/is/lib/isHSL.js CHANGED
@@ -1,11 +1,11 @@
1
- /* 2025-12-19 15:35:18 */
2
- import r from "./util/assertString.js";
1
+ /* 2026-01-04 16:21:26 */
2
+ import r from "../../assert/index.js";
3
3
  const t = /^hsla?\(((\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?)%){2}(,((\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?)%?))?\)$/i, a = /^hsla?\(((\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?)%){2}\s?(\/\s((\+|-)?([0-9]+(\.[0-9]+)?(e(\+|-)?[0-9]+)?|\.[0-9]+(e(\+|-)?[0-9]+)?)%?)\s?)?\)$/i;
4
- function i(s) {
5
- r(s);
4
+ function l(s) {
5
+ r({ value: s }, "isHSL");
6
6
  const e = s.replace(/\s+/g, " ").replace(/\s?(hsla?\(|\)|,)\s?/gi, "$1");
7
7
  return e.includes(",") ? t.test(e) : a.test(e);
8
8
  }
9
9
  export {
10
- i as default
10
+ l as default
11
11
  };
@@ -1,10 +1,10 @@
1
- /* 2025-12-19 15:35:18 */
2
- import t from "./util/assertString.js";
3
- const u = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
1
+ /* 2026-01-04 16:21:26 */
2
+ import u from "../../assert/index.js";
3
+ const t = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
4
4
  function i(F) {
5
- return t(F), u.test(F);
5
+ return u({ value: F }, "isHalfWidth"), t.test(F);
6
6
  }
7
7
  export {
8
8
  i as default,
9
- u as halfWidth
9
+ t as halfWidth
10
10
  };
package/is/lib/isHash.js CHANGED
@@ -1,6 +1,6 @@
1
- /* 2025-12-19 15:35:18 */
2
- import e from "./util/assertString.js";
3
- const r = {
1
+ /* 2026-01-04 16:21:26 */
2
+ import a from "../../assert/index.js";
3
+ const t = {
4
4
  md5: 32,
5
5
  md4: 32,
6
6
  sha1: 40,
@@ -15,8 +15,8 @@ const r = {
15
15
  crc32: 8,
16
16
  crc32b: 8
17
17
  };
18
- function i(s, t) {
19
- return e(s), new RegExp(`^[a-fA-F0-9]{${r[t]}}$`).test(s);
18
+ function i(s, e) {
19
+ return a({ value: s }, "isHash"), new RegExp(`^[a-fA-F0-9]{${t[e]}}$`).test(s);
20
20
  }
21
21
  export {
22
22
  i as default
@@ -1,12 +1,12 @@
1
- /* 2025-12-19 15:35:18 */
2
- import o from "lodash/defaults";
3
- import t from "./util/assertString.js";
4
- const s = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i, i = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i, a = {
1
+ /* 2026-01-04 16:21:26 */
2
+ import r from "lodash/defaults";
3
+ import t from "../../assert/index.js";
4
+ const s = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i, l = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i, a = {
5
5
  require_hashtag: !1
6
6
  };
7
- function x(r, e) {
8
- return t(r), e = o(e, a), (e.require_hashtag ? i : s).test(r);
7
+ function h(o, e) {
8
+ return t({ value: o }, "isHexColor"), e = r(e, a), (e.require_hashtag ? l : s).test(o);
9
9
  }
10
10
  export {
11
- x as default
11
+ h as default
12
12
  };
package/is/lib/isIMEI.js CHANGED
@@ -1,16 +1,16 @@
1
- /* 2025-12-19 15:35:18 */
2
- import c from "./util/assertString.js";
3
- const a = /^[0-9]{15}$/, o = /^\d{2}-\d{6}-\d{6}-\d{1}$/;
1
+ /* 2026-01-04 16:21:26 */
2
+ import a from "../../assert/index.js";
3
+ const c = /^[0-9]{15}$/, o = /^\d{2}-\d{6}-\d{6}-\d{1}$/;
4
4
  function m(e, s) {
5
- c(e), s = s || {};
6
- let f = a;
7
- if (s.allow_hyphens && (f = o), !f.test(e))
5
+ a({ value: e }, "isIMEI"), s = s || {};
6
+ let u = c;
7
+ if (s.allow_hyphens && (u = o), !u.test(e))
8
8
  return !1;
9
9
  e = e.replace(/-/g, "");
10
10
  let n = 0, t = 2;
11
11
  const l = 14;
12
12
  for (let i = 0; i < l; i++) {
13
- const u = e.substring(l - i - 1, l - i), r = parseInt(u, 10) * t;
13
+ const f = e.substring(l - i - 1, l - i), r = parseInt(f, 10) * t;
14
14
  r >= 10 ? n += r % 10 + 1 : n += r, t === 1 ? t += 1 : t -= 1;
15
15
  }
16
16
  return (10 - n % 10) % 10 === parseInt(e.substring(14, 15), 10);
package/is/lib/isIP.js CHANGED
@@ -1,21 +1,21 @@
1
- /* 2025-12-19 15:35:18 */
2
- import a from "lodash/isObject";
3
- import g from "./util/assertString.js";
4
- const o = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])", t = `(${o}[.]){3}${o}`, i = new RegExp(`^${t}$`), $ = "(?:[0-9a-fA-F]{1,4})", m = new RegExp(
5
- `^((?:${$}:){7}(?:${$}|:)|(?:${$}:){6}(?:${t}|:${$}|:)|(?:${$}:){5}(?::${t}|(:${$}){1,2}|:)|(?:${$}:){4}(?:(:${$}){0,1}:${t}|(:${$}){1,3}|:)|(?:${$}:){3}(?:(:${$}){0,2}:${t}|(:${$}){1,4}|:)|(?:${$}:){2}(?:(:${$}){0,3}:${t}|(:${$}){1,5}|:)|(?:${$}:){1}(?:(:${$}){0,4}:${t}|(:${$}){1,6}|:)|(?::((?::${$}){0,5}:${t}|(?::${$}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?$`
1
+ /* 2026-01-04 16:21:26 */
2
+ import i from "lodash/isObject";
3
+ import a from "../../assert/index.js";
4
+ const s = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])", $ = `(${s}[.]){3}${s}`, m = new RegExp(`^${$}$`), e = "(?:[0-9a-fA-F]{1,4})", v = new RegExp(
5
+ `^((?:${e}:){7}(?:${e}|:)|(?:${e}:){6}(?:${$}|:${e}|:)|(?:${e}:){5}(?::${$}|(:${e}){1,2}|:)|(?:${e}:){4}(?:(:${e}){0,1}:${$}|(:${e}){1,3}|:)|(?:${e}:){3}(?:(:${e}){0,2}:${$}|(:${e}){1,4}|:)|(?:${e}:){2}(?:(:${e}){0,3}:${$}|(:${e}){1,5}|:)|(?:${e}:){1}(?:(:${e}){0,4}:${$}|(:${e}){1,6}|:)|(?::((?::${e}){0,5}:${$}|(?::${e}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?$`
6
6
  );
7
- function s(e, n = {}) {
8
- g(e);
9
- const r = (a(n) ? n.version : arguments[1]) || "";
7
+ function o(t, n = {}) {
8
+ a({ value: t }, "isIP");
9
+ const r = (i(n) ? n.version : arguments[1]) || "";
10
10
  if (r) {
11
11
  if (r.toString() === "4")
12
- return i.test(e);
12
+ return m.test(t);
13
13
  if (r.toString() === "6")
14
- return m.test(e);
14
+ return v.test(t);
15
15
  } else
16
- return s(e, { version: 4 }) || s(e, { version: 6 });
16
+ return o(t, { version: 4 }) || o(t, { version: 6 });
17
17
  return !1;
18
18
  }
19
19
  export {
20
- s as default
20
+ o as default
21
21
  };
@@ -1,22 +1,22 @@
1
- /* 2025-12-19 15:35:18 */
2
- import r from "./isIP.js";
3
- import l from "./util/assertString.js";
4
- const f = /^\d{1,3}$/, a = 32, i = 128;
1
+ /* 2026-01-04 16:21:26 */
2
+ import l from "../../assert/index.js";
3
+ import a from "./isIP.js";
4
+ const u = /^\d{1,3}$/, r = 32, i = 128;
5
5
  function b(s, n = "") {
6
- l(s);
6
+ l({ value: s }, "isIPRange");
7
7
  const t = s.split("/");
8
- if (t.length !== 2 || !f.test(t[1]) || t[1].length > 1 && t[1].startsWith("0") || !r(t[0], n))
8
+ if (t.length !== 2 || !u.test(t[1]) || t[1].length > 1 && t[1].startsWith("0") || !a(t[0], n))
9
9
  return !1;
10
10
  let e = null;
11
11
  switch (String(n)) {
12
12
  case "4":
13
- e = a;
13
+ e = r;
14
14
  break;
15
15
  case "6":
16
16
  e = i;
17
17
  break;
18
18
  default:
19
- e = r(t[0], "6") ? i : a;
19
+ e = a(t[0], "6") ? i : r;
20
20
  }
21
21
  return t[1] <= e && t[1] >= 0;
22
22
  }
@@ -1,6 +1,6 @@
1
- /* 2025-12-19 15:35:18 */
2
- import A from "./util/assertString.js";
3
- const h = {
1
+ /* 2026-01-04 16:21:26 */
2
+ import A from "../../assert/index.js";
3
+ const d = {
4
4
  "zh-CN": (t) => {
5
5
  const u = [
6
6
  "11",
@@ -101,7 +101,7 @@ const h = {
101
101
  i += parseInt(r.charAt(a), 10) * parseInt(o[a], 10);
102
102
  const l = i % 11;
103
103
  return s[l];
104
- }, d = (e) => f(e) === e.charAt(17).toUpperCase(), g = (e) => {
104
+ }, h = (e) => f(e) === e.charAt(17).toUpperCase(), p = (e) => {
105
105
  let r = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(
106
106
  e
107
107
  );
@@ -110,7 +110,7 @@ const h = {
110
110
  if (r = c(i), !r) return !1;
111
111
  const l = `19${e.substring(6, 12)}`;
112
112
  return r = n(l), !!r;
113
- }, p = (e) => {
113
+ }, g = (e) => {
114
114
  let r = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(
115
115
  e
116
116
  );
@@ -118,9 +118,9 @@ const h = {
118
118
  const i = e.substring(0, 2);
119
119
  if (r = c(i), !r) return !1;
120
120
  const l = e.substring(6, 14);
121
- return r = n(l), r ? d(e) : !1;
121
+ return r = n(l), r ? h(e) : !1;
122
122
  };
123
- return ((e) => /^\d{15}|(\d{17}(\d|x|X))$/.test(e) ? e.length === 15 ? g(e) : p(e) : !1)(t);
123
+ return ((e) => /^\d{15}|(\d{17}(\d|x|X))$/.test(e) ? e.length === 15 ? p(e) : g(e) : !1)(t);
124
124
  },
125
125
  "zh-HK": (t) => {
126
126
  t = t.trim();
@@ -175,11 +175,11 @@ const h = {
175
175
  }
176
176
  };
177
177
  function I(t, u) {
178
- if (A(t), u in h)
179
- return h[u](t);
180
- for (const o in h)
181
- if (Object.prototype.hasOwnProperty.call(h, o)) {
182
- const s = h[o];
178
+ if (A({ value: t }, "isIdentityCard"), u in d)
179
+ return d[u](t);
180
+ for (const o in d)
181
+ if (Object.prototype.hasOwnProperty.call(d, o)) {
182
+ const s = d[o];
183
183
  if (s(t))
184
184
  return !0;
185
185
  }
package/is/lib/isJWT.js CHANGED
@@ -1,14 +1,14 @@
1
- /* 2025-12-19 15:35:18 */
2
- import i from "./isBase64.js";
3
- import o from "./util/assertString.js";
4
- function f(t) {
5
- o(t);
6
- const e = t.split(".");
7
- return e.length !== 3 ? !1 : e.reduce(
8
- (r, n) => r && i(n, { urlSafe: !0 }),
1
+ /* 2026-01-04 16:21:26 */
2
+ import i from "../../assert/index.js";
3
+ import l from "./isBase64.js";
4
+ function a(e) {
5
+ i({ value: e }, "isJWT");
6
+ const t = e.split(".");
7
+ return t.length !== 3 ? !1 : t.reduce(
8
+ (r, s) => r && l(s, { urlSafe: !0 }),
9
9
  !0
10
10
  );
11
11
  }
12
12
  export {
13
- f as default
13
+ a as default
14
14
  };
@@ -1,9 +1,9 @@
1
- /* 2025-12-19 15:35:18 */
2
- import r from "./util/assertString.js";
3
- const A = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/, t = /^([0-9a-fA-F]){12}$/, u = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/, d = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/, s = /^([0-9a-fA-F]){16}$/, c = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;
4
- function f(e, a) {
5
- return r(e), a?.eui && (a.eui = String(a.eui)), a?.no_colons || a?.no_separators ? a.eui === "48" ? t.test(e) : a.eui === "64" ? s.test(e) : t.test(e) || s.test(e) : a?.eui === "48" ? A.test(e) || u.test(e) : a?.eui === "64" ? d.test(e) || c.test(e) : f(e, { eui: "48" }) || f(e, { eui: "64" });
1
+ /* 2026-01-04 16:21:26 */
2
+ import f from "../../assert/index.js";
3
+ const r = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/, s = /^([0-9a-fA-F]){12}$/, u = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/, d = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/, t = /^([0-9a-fA-F]){16}$/, c = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;
4
+ function A(e, a) {
5
+ return f({ value: e }, "isMACAddress"), a?.eui && (a.eui = String(a.eui)), a?.no_colons || a?.no_separators ? a.eui === "48" ? s.test(e) : a.eui === "64" ? t.test(e) : s.test(e) || t.test(e) : a?.eui === "48" ? r.test(e) || u.test(e) : a?.eui === "64" ? d.test(e) || c.test(e) : A(e, { eui: "48" }) || A(e, { eui: "64" });
6
6
  }
7
7
  export {
8
- f as default
8
+ A as default
9
9
  };
package/is/lib/isMD5.js CHANGED
@@ -1,8 +1,8 @@
1
- /* 2025-12-19 15:35:18 */
2
- import r from "./util/assertString.js";
3
- const e = /^[a-f0-9]{32}$/;
1
+ /* 2026-01-04 16:21:26 */
2
+ import e from "../../assert/index.js";
3
+ const s = /^[a-f0-9]{32}$/;
4
4
  function o(t) {
5
- return r(t), e.test(t);
5
+ return e({ value: t }, "isMD5"), s.test(t);
6
6
  }
7
7
  export {
8
8
  o as default
@@ -1,8 +1,8 @@
1
- /* 2025-12-19 15:35:18 */
2
- import e from "./util/assertString.js";
1
+ /* 2026-01-04 16:21:26 */
2
+ import t from "../../assert/index.js";
3
3
  const a = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9.\-+_]{1,100}$/i, i = /^text\/[a-zA-Z0-9.\-+]{1,100};\s?charset=("[a-zA-Z0-9.\-+\s]{0,70}"|[a-zA-Z0-9.\-+]{0,70})(\s?\([a-zA-Z0-9.\-+\s]{1,20}\))?$/i, s = /^multipart\/[a-zA-Z0-9.\-+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9.\-+\s]{0,70}"|[a-zA-Z0-9.\-+]{0,70})(\s?\([a-zA-Z0-9.\-+\s]{1,20}\))?){0,2}$/i;
4
- function o(t) {
5
- return e(t), a.test(t) || i.test(t) || s.test(t);
4
+ function o(e) {
5
+ return t({ value: e }, "isMimeType"), a.test(e) || i.test(e) || s.test(e);
6
6
  }
7
7
  export {
8
8
  o as default
@@ -1,5 +1,5 @@
1
- /* 2025-12-19 15:35:18 */
2
- import t from "./util/assertString.js";
1
+ /* 2026-01-04 16:21:26 */
2
+ import t from "../../assert/index.js";
3
3
  const d = {
4
4
  "am-AM": /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,
5
5
  "ar-AE": /^((\+?971)|0)?5[024568]\d{7}$/,
@@ -171,7 +171,7 @@ d["ga-IE"] = d["en-IE"];
171
171
  d["fr-CH"] = d["de-CH"];
172
172
  d["it-CH"] = d["fr-CH"];
173
173
  function f(e, $, n) {
174
- if (t(e), n && n.strictMode && !e.startsWith("+"))
174
+ if (t({ value: e }, "isMobilePhone"), n && n.strictMode && !e.startsWith("+"))
175
175
  return !1;
176
176
  if (Array.isArray($))
177
177
  return $.some((s) => !!(Object.prototype.hasOwnProperty.call(d, s) && d[s].test(e)));
package/is/lib/isPort.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-12-19 15:35:18 */
1
+ /* 2026-01-04 16:21:26 */
2
2
  function n(e) {
3
3
  return Number.isInteger(e) && e >= 0 && e <= 65535;
4
4
  }
@@ -1,17 +1,17 @@
1
- /* 2025-12-19 15:35:18 */
2
- import s from "lodash/isObject";
1
+ /* 2026-01-04 16:21:26 */
2
+ import c from "lodash/isObject";
3
3
  import a from "lodash/isUndefined";
4
- import o from "./util/assertString.js";
5
- const n = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/, c = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/, g = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/, i = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/, u = /^rgba?/;
4
+ import n from "../../assert/index.js";
5
+ const o = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/, s = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/, g = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/, u = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/, i = /^rgba?/;
6
6
  function m(e, t) {
7
- o(e);
7
+ n({ value: e }, "isRgbColor");
8
8
  let l = !1, r = !0;
9
- if (s(t) ? (l = a(t.allowSpaces) ? l : t.allowSpaces, r = a(t.includePercentValues) ? r : t.includePercentValues) : arguments.length >= 2 && (r = arguments[1]), l) {
10
- if (!u.test(e))
9
+ if (c(t) ? (l = a(t.allowSpaces) ? l : t.allowSpaces, r = a(t.includePercentValues) ? r : t.includePercentValues) : arguments.length >= 2 && (r = arguments[1]), l) {
10
+ if (!i.test(e))
11
11
  return !1;
12
12
  e = e.replace(/\s/g, "");
13
13
  }
14
- return r ? n.test(e) || c.test(e) || g.test(e) || i.test(e) : n.test(e) || c.test(e);
14
+ return r ? o.test(e) || s.test(e) || g.test(e) || u.test(e) : o.test(e) || s.test(e);
15
15
  }
16
16
  export {
17
17
  m as default
@@ -1,5 +1,5 @@
1
- /* 2025-12-19 15:35:18 */
2
- import i from "./util/assertString.js";
1
+ /* 2026-01-04 16:21:26 */
2
+ import i from "../../assert/index.js";
3
3
  const r = a(
4
4
  [
5
5
  "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)",
@@ -12,9 +12,9 @@ function a(e, n) {
12
12
  const t = e.join("");
13
13
  return new RegExp(t, n);
14
14
  }
15
- function s(e) {
16
- return i(e), r.test(e);
15
+ function o(e) {
16
+ return i({ value: e }, "isSemVer"), r.test(e);
17
17
  }
18
18
  export {
19
- s as default
19
+ o as default
20
20
  };
package/is/lib/isSlug.js CHANGED
@@ -1,9 +1,9 @@
1
- /* 2025-12-19 15:35:18 */
2
- import s from "./util/assertString.js";
3
- const e = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;
4
- function a(t) {
5
- return s(t), e.test(t);
1
+ /* 2026-01-04 16:21:26 */
2
+ import e from "../../assert/index.js";
3
+ const t = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;
4
+ function r(s) {
5
+ return e({ value: s }, "isSlug"), t.test(s);
6
6
  }
7
7
  export {
8
- a as default
8
+ r as default
9
9
  };
@@ -1,7 +1,7 @@
1
- /* 2025-12-19 15:35:18 */
1
+ /* 2026-01-04 16:21:26 */
2
2
  import r from "lodash/defaults";
3
- import u from "./util/assertString.js";
4
- const s = /^[A-Z]$/, i = /^[a-z]$/, m = /^[0-9]$/, l = /^[-#!$@£%^&*()_+|~=`{}[\]:";'<>?,./\\ ]$/, C = {
3
+ import u from "../../assert/index.js";
4
+ const s = /^[A-Z]$/, i = /^[a-z]$/, m = /^[0-9]$/, a = /^[-#!$@£%^&*()_+|~=`{}[\]:";'<>?,./\\ ]$/, l = {
5
5
  minLength: 8,
6
6
  minLowercase: 1,
7
7
  minUppercase: 1,
@@ -15,14 +15,14 @@ const s = /^[A-Z]$/, i = /^[a-z]$/, m = /^[0-9]$/, l = /^[-#!$@£%^&*()_+|~=`{}[
15
15
  pointsForContainingNumber: 10,
16
16
  pointsForContainingSymbol: 10
17
17
  };
18
- function a(t) {
18
+ function C(t) {
19
19
  const e = {};
20
20
  return Array.from(t).forEach((n) => {
21
21
  e[n] ? e[n] += 1 : e[n] = 1;
22
22
  }), e;
23
23
  }
24
24
  function p(t) {
25
- const e = a(t), n = {
25
+ const e = C(t), n = {
26
26
  length: t.length,
27
27
  uniqueChars: Object.keys(e).length,
28
28
  uppercaseCount: 0,
@@ -31,7 +31,7 @@ function p(t) {
31
31
  symbolCount: 0
32
32
  };
33
33
  return Object.keys(e).forEach((o) => {
34
- s.test(o) ? n.uppercaseCount += e[o] : i.test(o) ? n.lowercaseCount += e[o] : m.test(o) ? n.numberCount += e[o] : l.test(o) && (n.symbolCount += e[o]);
34
+ s.test(o) ? n.uppercaseCount += e[o] : i.test(o) ? n.lowercaseCount += e[o] : m.test(o) ? n.numberCount += e[o] : a.test(o) && (n.symbolCount += e[o]);
35
35
  }), n;
36
36
  }
37
37
  function c(t, e) {
@@ -39,9 +39,9 @@ function c(t, e) {
39
39
  return n += t.uniqueChars * e.pointsPerUnique, n += (t.length - t.uniqueChars) * e.pointsPerRepeat, t.lowercaseCount > 0 && (n += e.pointsForContainingLower), t.uppercaseCount > 0 && (n += e.pointsForContainingUpper), t.numberCount > 0 && (n += e.pointsForContainingNumber), t.symbolCount > 0 && (n += e.pointsForContainingSymbol), n;
40
40
  }
41
41
  function g(t, e = null) {
42
- u(t);
42
+ u({ value: t }, "isStrongPassword");
43
43
  const n = p(t);
44
- return e = r(e || {}, C), e.returnScore ? c(n, e) : n.length >= e.minLength && n.lowercaseCount >= e.minLowercase && n.uppercaseCount >= e.minUppercase && n.numberCount >= e.minNumbers && n.symbolCount >= e.minSymbols;
44
+ return e = r(e || {}, l), e.returnScore ? c(n, e) : n.length >= e.minLength && n.lowercaseCount >= e.minLowercase && n.uppercaseCount >= e.minUppercase && n.numberCount >= e.minNumbers && n.symbolCount >= e.minSymbols;
45
45
  }
46
46
  export {
47
47
  g as default
package/is/lib/isURL.js CHANGED
@@ -1,9 +1,9 @@
1
- /* 2025-12-19 15:35:18 */
1
+ /* 2026-01-04 16:21:26 */
2
2
  import k from "lodash/defaults";
3
- import z from "./isFQDN.js";
3
+ import z from "../../assert/index.js";
4
+ import L from "./isFQDN.js";
4
5
  import v from "./isIP.js";
5
- import O from "./util/assertString.js";
6
- const $ = {
6
+ const O = {
7
7
  protocols: ["http", "https", "ftp"],
8
8
  require_tld: !0,
9
9
  require_protocol: !1,
@@ -17,62 +17,62 @@ const $ = {
17
17
  allow_query_components: !0,
18
18
  validate_length: !0,
19
19
  max_allowed_length: 2084
20
- }, j = /^\[([^\]]+)\](?::([0-9]+))?$/;
21
- function U(e, t) {
22
- if (O(e), !e || /[\s<>]/.test(e) || e.indexOf("mailto:") === 0 || (t = k(t, $), t.validate_length && e.length > t.max_allowed_length) || !t.allow_fragments && e.includes("#") || !t.allow_query_components && (e.includes("?") || e.includes("&")))
20
+ }, U = /^\[([^\]]+)\](?::([0-9]+))?$/;
21
+ function P(e, l) {
22
+ if (z({ value: e }, "isURL"), !e || /[\s<>]/.test(e) || e.indexOf("mailto:") === 0 || (l = k(l, O), l.validate_length && e.length > l.max_allowed_length) || !l.allow_fragments && e.includes("#") || !l.allow_query_components && (e.includes("?") || e.includes("&")))
23
23
  return !1;
24
- let d, f, r, _, c, l, s, o;
25
- s = e.split("#"), e = s.shift(), s = e.split("?"), e = s.shift();
26
- const n = e.match(/^([a-z][a-z0-9+\-.]*):/i);
24
+ let d, f, r, n, _, i, t, o;
25
+ t = e.split("#"), e = t.shift(), t = e.split("?"), e = t.shift();
26
+ const u = e.match(/^([a-z][a-z0-9+\-.]*):/i);
27
27
  let g = !1;
28
- const u = (i) => (g = !0, d = i.toLowerCase(), t.require_valid_protocol && !t.protocols.includes(d) ? !1 : e.substring(n[0].length));
29
- if (n) {
30
- const i = n[1], a = e.substring(n[0].length);
28
+ const c = (s) => (g = !0, d = s.toLowerCase(), l.require_valid_protocol && !l.protocols.includes(d) ? !1 : e.substring(u[0].length));
29
+ if (u) {
30
+ const s = u[1], a = e.substring(u[0].length);
31
31
  if (a.slice(0, 2) === "//") {
32
- if (e = u(i), e === !1)
32
+ if (e = c(s), e === !1)
33
33
  return !1;
34
34
  } else {
35
35
  const m = a.indexOf("/"), w = m === -1 ? a : a.substring(0, m), q = w.indexOf("@");
36
36
  if (q !== -1) {
37
37
  const p = w.substring(0, q), x = /^[a-zA-Z0-9\-_.%:]*$/.test(p), b = /%[0-9a-fA-F]{2}/.test(p);
38
38
  if (x && !b) {
39
- if (t.require_protocol)
39
+ if (l.require_protocol)
40
40
  return !1;
41
- } else if (e = u(i), e === !1)
41
+ } else if (e = c(s), e === !1)
42
42
  return !1;
43
43
  } else if (/^[0-9]/.test(a)) {
44
- if (t.require_protocol)
44
+ if (l.require_protocol)
45
45
  return !1;
46
- } else if (e = u(i), e === !1)
46
+ } else if (e = c(s), e === !1)
47
47
  return !1;
48
48
  }
49
- } else if (t.require_protocol)
49
+ } else if (l.require_protocol)
50
50
  return !1;
51
51
  if (e.slice(0, 2) === "//") {
52
- if (!g && !t.allow_protocol_relative_urls)
52
+ if (!g && !l.allow_protocol_relative_urls)
53
53
  return !1;
54
54
  e = e.slice(2);
55
55
  }
56
56
  if (e === "")
57
57
  return !1;
58
- if (s = e.split("/"), e = s.shift(), e === "" && !t.require_host)
58
+ if (t = e.split("/"), e = t.shift(), e === "" && !l.require_host)
59
59
  return !0;
60
- if (s = e.split("@"), s.length > 1) {
61
- if (t.disallow_auth || s[0] === "" || (f = s.shift(), f.includes(":") && f.split(":").length > 2))
60
+ if (t = e.split("@"), t.length > 1) {
61
+ if (l.disallow_auth || t[0] === "" || (f = t.shift(), f.includes(":") && f.split(":").length > 2))
62
62
  return !1;
63
- const [i, a] = f.split(":");
64
- if (i === "" && a === "")
63
+ const [s, a] = f.split(":");
64
+ if (s === "" && a === "")
65
65
  return !1;
66
66
  }
67
- _ = s.join("@"), l = null, o = null;
68
- const h = _.match(j);
69
- if (h ? (r = "", o = h[1], l = h[2] || null) : (s = _.split(":"), r = s.shift(), s.length && (l = s.join(":"))), l !== null && l.length > 0) {
70
- if (c = parseInt(l, 10), !/^[0-9]+$/.test(l) || c <= 0 || c > 65535)
67
+ n = t.join("@"), i = null, o = null;
68
+ const h = n.match(U);
69
+ if (h ? (r = "", o = h[1], i = h[2] || null) : (t = n.split(":"), r = t.shift(), t.length && (i = t.join(":"))), i !== null && i.length > 0) {
70
+ if (_ = parseInt(i, 10), !/^[0-9]+$/.test(i) || _ <= 0 || _ > 65535)
71
71
  return !1;
72
- } else if (t.require_port)
72
+ } else if (l.require_port)
73
73
  return !1;
74
- return r === "" && !t.require_host ? !0 : !v(r) && !z(r, t) && (!o || !v(o, 6)) ? !1 : (r = r || o, !0);
74
+ return r === "" && !l.require_host ? !0 : !v(r) && !L(r, l) && (!o || !v(o, 6)) ? !1 : (r = r || o, !0);
75
75
  }
76
76
  export {
77
- U as default
77
+ P as default
78
78
  };
package/is/lib/isUUID.js CHANGED
@@ -1,6 +1,6 @@
1
- /* 2025-12-19 15:35:18 */
1
+ /* 2026-01-04 16:21:26 */
2
2
  import i from "lodash/isNil";
3
- import a from "./util/assertString.js";
3
+ import a from "../../assert/index.js";
4
4
  const F = {
5
5
  1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
6
6
  2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
@@ -16,9 +16,9 @@ const F = {
16
16
  // From https://github.com/uuidjs/uuid/blob/main/src/regex.js
17
17
  all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i
18
18
  };
19
- function l(A, f) {
20
- return a(A), i(f) && (f = "all"), f in F ? F[f].test(A) : !1;
19
+ function t(A, f) {
20
+ return a({ value: A }, "isUUID"), i(f) && (f = "all"), f in F ? F[f].test(A) : !1;
21
21
  }
22
22
  export {
23
- l as default
23
+ t as default
24
24
  };
@@ -1,10 +1,10 @@
1
- /* 2025-12-19 15:35:18 */
2
- import { fullWidth as i } from "./isFullWidth.js";
3
- import { halfWidth as r } from "./isHalfWidth.js";
4
- import o from "./util/assertString.js";
5
- function m(t) {
6
- return o(t), i.test(t) && r.test(t);
1
+ /* 2026-01-04 16:21:26 */
2
+ import i from "../../assert/index.js";
3
+ import { fullWidth as r } from "./isFullWidth.js";
4
+ import { halfWidth as a } from "./isHalfWidth.js";
5
+ function l(t) {
6
+ return i({ value: t }, "isVariableWidth"), r.test(t) && a.test(t);
7
7
  }
8
8
  export {
9
- m as default
9
+ l as default
10
10
  };