@unicom-cloud/utils 0.1.33 → 0.1.35
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/assert/index.js +41 -0
- package/assert.js +9 -0
- package/case-name/index.js +1 -1
- package/caseName.js +1 -1
- package/class-name/index.js +1 -1
- package/className.js +1 -1
- package/clipboard-copy/index.js +7 -7
- package/clipboardCopy.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/emoji.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/isMobile.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +1 -1
- package/constant/protocol.js +1 -1
- package/constant/string.js +1 -1
- package/constant/ui.js +1 -1
- package/constant.js +1 -1
- package/content-disposition/index.js +1 -1
- package/contentDisposition.js +1 -1
- package/cookie/index.js +1 -1
- package/cookie/src/api.js +1 -1
- package/cookie/src/assign.js +1 -1
- package/cookie/src/converter.js +1 -1
- package/cookie.js +1 -1
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/date.js +1 -1
- package/decimal/decimal.js +1 -1
- package/decimal/index.js +1 -1
- package/decimal.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getElementCoordinates.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +1 -1
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/domHelpers.js +1 -1
- package/emitter/index.js +1 -1
- package/emitter/src/index.js +1 -1
- package/emitter.js +1 -1
- package/escape/index.js +1 -1
- package/escape.js +1 -1
- package/file/fileRead.js +55 -0
- package/file/fileToDataURL.js +9 -0
- package/file/index.js +5 -3
- package/file/saveAs.js +34 -29
- package/file.js +5 -3
- package/function/index.js +51 -0
- package/function.js +49 -0
- package/idb/index.js +1 -1
- package/idb.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -1
- package/invariant.js +1 -1
- package/is/index.js +201 -198
- package/is/lib/isAscii.js +6 -6
- package/is/lib/isBase64.js +5 -5
- package/is/lib/isChinese.js +1 -1
- package/is/lib/isDataURI.js +11 -11
- package/is/lib/isEmail.js +25 -25
- package/is/lib/isFQDN.js +13 -7
- package/is/lib/isFullWidth.js +5 -5
- package/is/lib/isHSL.js +5 -5
- package/is/lib/isHalfWidth.js +5 -5
- package/is/lib/isHash.js +5 -5
- package/is/lib/isHexColor.js +7 -7
- package/is/lib/isIMEI.js +9 -8
- package/is/lib/isIP.js +12 -12
- package/is/lib/isIPRange.js +8 -8
- package/is/lib/isIdentityCard.js +12 -12
- package/is/lib/isJWT.js +9 -9
- package/is/lib/isMACAddress.js +6 -6
- package/is/lib/isMD5.js +4 -4
- package/is/lib/isMimeType.js +4 -4
- package/is/lib/isMobilePhone.js +3 -3
- package/is/lib/isPort.js +1 -1
- package/is/lib/isRgbColor.js +8 -8
- package/is/lib/isSemVer.js +5 -5
- package/is/lib/isSlug.js +6 -6
- package/is/lib/isStrongPassword.js +8 -8
- package/is/lib/isURL.js +32 -32
- package/is/lib/isUUID.js +5 -5
- package/is/lib/isVariableWidth.js +7 -7
- package/is.js +78 -76
- package/lunar/index.js +1 -1
- package/lunar/lib/Holiday.js +1 -1
- package/lunar/lib/HolidayUtil.js +1 -1
- package/lunar/lib/I18n.js +1 -1
- package/lunar/lib/JieQi.js +1 -1
- package/lunar/lib/Lunar.js +1 -1
- package/lunar/lib/LunarMonth.js +1 -1
- package/lunar/lib/LunarTime.js +1 -1
- package/lunar/lib/LunarUtil.js +1 -1
- package/lunar/lib/LunarYear.js +1 -1
- package/lunar/lib/ShouXingUtil.js +1 -1
- package/lunar/lib/Solar.js +1 -1
- package/lunar/lib/SolarHalfYear.js +1 -1
- package/lunar/lib/SolarMonth.js +1 -1
- package/lunar/lib/SolarSeason.js +1 -1
- package/lunar/lib/SolarUtil.js +1 -1
- package/lunar/lib/SolarWeek.js +1 -1
- package/lunar/lib/SolarYear.js +1 -1
- package/lunar/lib/index.js +1 -1
- package/lunar.js +1 -1
- package/math/index.js +1 -1
- package/math.js +1 -1
- package/md5/index.js +1 -1
- package/md5.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/mock.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -1
- package/normalizeWheel.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/numberToChinese.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/nzh.js +1 -1
- package/object/index.js +18 -0
- package/object.js +8 -0
- package/package.json +1 -1
- package/pinyin/index.js +1 -1
- package/pinyin/simplified.js +1 -1
- package/pinyin/src/core.js +1 -1
- package/pinyin/src/simplified.js +1 -1
- package/pinyin/src/simplified_dict.js +1 -1
- package/pinyin/src/traditional.js +1 -1
- package/pinyin/src/traditional_dict.js +1 -1
- package/pinyin/traditional.js +1 -1
- package/pinyin.js +1 -1
- package/query-string/base.js +1 -1
- package/query-string/index.js +1 -1
- package/query-string/splitOnFirst.js +1 -1
- package/queryString.js +1 -1
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/random.js +1 -1
- package/screenfull/index.js +1 -1
- package/screenfull.js +1 -1
- package/sleep/index.js +1 -1
- package/sleep.js +1 -1
- package/snapdom/index.js +1 -1
- package/snapdom/src/api/preCache.js +1 -1
- package/snapdom/src/api/snapdom.js +1 -1
- package/snapdom/src/core/cache.js +1 -1
- package/snapdom/src/core/capture.js +1 -1
- package/snapdom/src/core/clone.js +1 -1
- package/snapdom/src/core/context.js +1 -1
- package/snapdom/src/core/plugins.js +1 -1
- package/snapdom/src/core/prepare.js +1 -1
- package/snapdom/src/exporters/download.js +1 -1
- package/snapdom/src/exporters/toBlob.js +1 -1
- package/snapdom/src/exporters/toCanvas.js +1 -1
- package/snapdom/src/exporters/toImg.js +1 -1
- package/snapdom/src/modules/CSSVar.js +1 -1
- package/snapdom/src/modules/background.js +1 -1
- package/snapdom/src/modules/changeCSS.js +1 -1
- package/snapdom/src/modules/counter.js +1 -1
- package/snapdom/src/modules/fonts.js +1 -1
- package/snapdom/src/modules/iconFonts.js +1 -1
- package/snapdom/src/modules/images.js +1 -1
- package/snapdom/src/modules/lineClamp.js +1 -1
- package/snapdom/src/modules/pseudo.js +1 -1
- package/snapdom/src/modules/rasterize.js +1 -1
- package/snapdom/src/modules/snapFetch.js +1 -1
- package/snapdom/src/modules/styles.js +1 -1
- package/snapdom/src/modules/svgDefs.js +1 -1
- package/snapdom/src/utils/browser.js +1 -1
- package/snapdom/src/utils/capture.helpers.js +1 -1
- package/snapdom/src/utils/clone.helpers.js +1 -1
- package/snapdom/src/utils/css.js +1 -1
- package/snapdom/src/utils/helpers.js +1 -1
- package/snapdom/src/utils/image.js +1 -1
- package/snapdom/src/utils/prepare.helpers.js +1 -1
- package/snapdom/src/utils/transforms.helpers.js +1 -1
- package/snapdom.js +1 -1
- package/string/index.js +1 -1
- package/string.js +1 -1
- package/tinycolor/index.js +1 -1
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/css-color-names.js +1 -1
- package/tinycolor/src/format-input.js +1 -1
- package/tinycolor/src/from-ratio.js +1 -1
- package/tinycolor/src/index.js +1 -1
- package/tinycolor/src/random.js +1 -1
- package/tinycolor/src/readability.js +1 -1
- package/tinycolor/src/to-ms-filter.js +1 -1
- package/tinycolor/src/utils.js +1 -1
- package/tinycolor.js +1 -1
- package/tree/index.js +1 -1
- package/tree/search/index.js +1 -1
- package/tree.js +1 -1
- package/tween/index.js +1 -1
- package/tween/src/easing.js +1 -1
- package/tween/src/tween.js +1 -1
- package/tween.js +1 -1
- package/types/assert/index.d.ts +8 -0
- package/types/clipboard-copy/index.d.ts +1 -1
- package/types/file/fileRead.d.ts +11 -0
- package/types/file/fileToDataURL.d.ts +3 -0
- package/types/file/index.d.ts +3 -2
- package/types/file/saveAs.d.ts +2 -1
- package/types/function/index.d.ts +2 -0
- package/types/is/index.d.ts +18 -16
- package/types/is/lib/isIP.d.ts +3 -1
- package/types/is/lib/isURL.d.ts +1 -1
- package/types/lodash/isPromise.d.ts +1 -1
- package/types/object/index.d.ts +5 -0
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/uiColor.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/url-toolkit/src/url-toolkit.js +1 -1
- package/urlToolkit.js +1 -1
- package/validate/index.js +1 -1
- package/validate/src/index.js +5 -4
- package/validate/src/locale/en-US.js +1 -1
- package/validate/src/locale/index.js +1 -1
- package/validate/src/locale/zh-CN.js +1 -1
- package/validate/src/rules/array.js +1 -1
- package/validate/src/rules/base.js +1 -1
- package/validate/src/rules/boolean.js +1 -1
- package/validate/src/rules/custom.js +1 -1
- package/validate/src/rules/number.js +1 -1
- package/validate/src/rules/object.js +1 -1
- package/validate/src/rules/string.js +1 -1
- package/validate/src/rules/type.js +1 -1
- package/validate.js +1 -1
- package/version/index.js +1 -1
- package/version.js +1 -1
- package/xlsx/index.js +1 -1
- package/xlsx/xlsx.js +2 -2
- package/xlsx.js +1 -1
- package/file/fileToURL.js +0 -25
- package/is/lib/util/assertString.js +0 -12
- package/object-keys-sort/index.js +0 -8
- package/object-prototype-to-string-call/index.js +0 -9
- package/objectKeysSort.js +0 -5
- package/objectPrototypeToStringCall.js +0 -6
- package/types/file/fileToURL.d.ts +0 -2
- package/types/is/lib/util/assertString.d.ts +0 -1
- package/types/object-keys-sort/index.d.ts +0 -4
- package/types/object-prototype-to-string-call/index.d.ts +0 -2
package/is/index.js
CHANGED
|
@@ -1,216 +1,219 @@
|
|
|
1
|
-
/* 2025-12-
|
|
2
|
-
import { default as
|
|
3
|
-
import
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
|
+
import { default as q } from "lodash/isArguments.js";
|
|
3
|
+
import l from "lodash/isArray.js";
|
|
4
|
+
import { default as z } from "lodash/isArray.js";
|
|
5
|
+
import { default as K } from "lodash/isArrayBuffer.js";
|
|
6
|
+
import { default as X } from "lodash/isArrayLike.js";
|
|
7
|
+
import { default as Z } from "lodash/isArrayLikeObject.js";
|
|
8
|
+
import { default as tt } from "lodash/isBoolean.js";
|
|
9
|
+
import { default as et } from "lodash/isBuffer.js";
|
|
10
|
+
import { default as st } from "lodash/isDate.js";
|
|
11
|
+
import { default as ft } from "lodash/isElement.js";
|
|
12
12
|
import s from "lodash/isEmpty.js";
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import
|
|
32
|
-
import { default as
|
|
33
|
-
import
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { isAllChinese as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import
|
|
75
|
-
function
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
|
|
13
|
+
import { default as nt } from "lodash/isEmpty.js";
|
|
14
|
+
import { default as lt } from "lodash/isEqual.js";
|
|
15
|
+
import { default as ut } from "lodash/isEqualWith.js";
|
|
16
|
+
import { default as xt } from "lodash/isError.js";
|
|
17
|
+
import { default as bt } from "lodash/isFinite.js";
|
|
18
|
+
import o from "lodash/isFunction.js";
|
|
19
|
+
import { default as gt } from "lodash/isFunction.js";
|
|
20
|
+
import { default as St } from "lodash/isInteger.js";
|
|
21
|
+
import { default as At } from "lodash/isLength.js";
|
|
22
|
+
import { default as It } from "lodash/isMap.js";
|
|
23
|
+
import { default as Ot } from "lodash/isMatch.js";
|
|
24
|
+
import { default as Ft } from "lodash/isMatchWith.js";
|
|
25
|
+
import { default as Ct } from "lodash/isNaN.js";
|
|
26
|
+
import { default as jt } from "lodash/isNative.js";
|
|
27
|
+
import m from "lodash/isNil.js";
|
|
28
|
+
import { default as Lt } from "lodash/isNil.js";
|
|
29
|
+
import { default as Tt } from "lodash/isNull.js";
|
|
30
|
+
import { default as kt } from "lodash/isNumber.js";
|
|
31
|
+
import i from "lodash/isObject.js";
|
|
32
|
+
import { default as $t } from "lodash/isObject.js";
|
|
33
|
+
import u from "lodash/isObjectLike.js";
|
|
34
|
+
import { default as Ht } from "lodash/isObjectLike.js";
|
|
35
|
+
import { default as qt } from "lodash/isPlainObject.js";
|
|
36
|
+
import { default as zt } from "lodash/isRegExp.js";
|
|
37
|
+
import { default as Kt } from "lodash/isSafeInteger.js";
|
|
38
|
+
import { default as Xt } from "lodash/isSet.js";
|
|
39
|
+
import p from "lodash/isString.js";
|
|
40
|
+
import { default as Zt } from "lodash/isString.js";
|
|
41
|
+
import { default as tr } from "lodash/isSymbol.js";
|
|
42
|
+
import { default as er } from "lodash/isTypedArray.js";
|
|
43
|
+
import x from "lodash/isUndefined.js";
|
|
44
|
+
import { default as sr } from "lodash/isUndefined.js";
|
|
45
|
+
import { default as fr } from "lodash/isWeakMap.js";
|
|
46
|
+
import { default as nr } from "lodash/isWeakSet.js";
|
|
47
|
+
import { default as lr } from "./lib/isAscii.js";
|
|
48
|
+
import { default as ur } from "./lib/isBase64.js";
|
|
49
|
+
import { isAllChinese as xr, default as cr } from "./lib/isChinese.js";
|
|
50
|
+
import { default as yr } from "./lib/isDataURI.js";
|
|
51
|
+
import { default as hr } from "./lib/isEmail.js";
|
|
52
|
+
import { default as Er } from "./lib/isFullWidth.js";
|
|
53
|
+
import { default as Pr } from "./lib/isHalfWidth.js";
|
|
54
|
+
import { default as Nr } from "./lib/isHash.js";
|
|
55
|
+
import { default as Br } from "./lib/isHexColor.js";
|
|
56
|
+
import { default as Mr } from "./lib/isHSL.js";
|
|
57
|
+
import { default as Wr } from "./lib/isIdentityCard.js";
|
|
58
|
+
import { default as wr } from "./lib/isIMEI.js";
|
|
59
|
+
import { default as Rr } from "./lib/isIP.js";
|
|
60
|
+
import { default as Ur } from "./lib/isIPRange.js";
|
|
61
|
+
import { default as Vr } from "./lib/isJWT.js";
|
|
62
|
+
import { default as Dr } from "./lib/isMACAddress.js";
|
|
63
|
+
import { default as Jr } from "./lib/isMD5.js";
|
|
64
|
+
import { default as _r } from "./lib/isMimeType.js";
|
|
65
|
+
import { default as Gr, locales as Kr } from "./lib/isMobilePhone.js";
|
|
66
|
+
import { default as Xr } from "./lib/isPort.js";
|
|
67
|
+
import { default as Zr } from "./lib/isRgbColor.js";
|
|
68
|
+
import { default as te } from "./lib/isSemVer.js";
|
|
69
|
+
import { default as ee } from "./lib/isSlug.js";
|
|
70
|
+
import { default as se } from "./lib/isStrongPassword.js";
|
|
71
|
+
import { default as fe } from "./lib/isURL.js";
|
|
72
|
+
import { default as ne } from "./lib/isUUID.js";
|
|
73
|
+
import { default as le } from "./lib/isVariableWidth.js";
|
|
74
|
+
import { objectPrototypeToStringCall as e } from "../object/index.js";
|
|
75
|
+
function O(t, r = !0) {
|
|
76
|
+
return r ? t instanceof Promise || i(t) && o(t.then) && o(t.catch) && o(t.finally) : e(t, "Promise");
|
|
77
|
+
}
|
|
78
|
+
function B(t, r = !0) {
|
|
79
|
+
return r ? t instanceof File : e(t, "File");
|
|
80
|
+
}
|
|
81
|
+
function F(t, r = !0) {
|
|
82
|
+
return r ? t instanceof Blob : e(t, "Blob");
|
|
83
|
+
}
|
|
84
|
+
function M(t, r = !0) {
|
|
85
|
+
return r ? t instanceof ReadableStream : e(t, "ReadableStream");
|
|
86
|
+
}
|
|
87
|
+
function C(t, r = !0) {
|
|
88
|
+
return r ? t instanceof EventTarget : e(t, "EventTarget");
|
|
89
|
+
}
|
|
90
|
+
function W(t) {
|
|
91
|
+
return e(t, "AsyncFunction");
|
|
92
|
+
}
|
|
93
|
+
function j(t) {
|
|
94
|
+
return typeof t == "bigint" || e(t, "BigInt");
|
|
95
|
+
}
|
|
96
|
+
function c(t) {
|
|
97
|
+
if (!(t && p(t))) return !1;
|
|
92
98
|
try {
|
|
93
|
-
const
|
|
94
|
-
return [null, !1, !0].includes(
|
|
95
|
-
} catch (
|
|
96
|
-
console.error(
|
|
99
|
+
const r = JSON.parse(t);
|
|
100
|
+
return [null, !1, !0].includes(r) || !!r && i(r);
|
|
101
|
+
} catch (r) {
|
|
102
|
+
console.error(r);
|
|
97
103
|
}
|
|
98
104
|
return !1;
|
|
99
105
|
}
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
const w = c, b = m;
|
|
107
|
+
function L(t) {
|
|
108
|
+
return l(t) && s(t);
|
|
102
109
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
110
|
+
function R(t) {
|
|
111
|
+
return u(t) && s(t);
|
|
105
112
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
113
|
+
function T(t) {
|
|
114
|
+
return b(t) || t === "";
|
|
108
115
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
116
|
+
function U(t) {
|
|
117
|
+
const r = /^#(?:[0-9a-fA-F]{3}){1,2}$/, f = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/, a = /^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(1|0|0?\.\d+)\)$/, n = /^hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)$/, d = /^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(1|0|0?\.\d+)\)$/;
|
|
118
|
+
return r.test(t) || f.test(t) || a.test(t) || n.test(t) || d.test(t);
|
|
111
119
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
120
|
+
function k(t) {
|
|
121
|
+
const r = document.createElement("div");
|
|
122
|
+
return r.style.color = t, r.style.color !== "";
|
|
114
123
|
}
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
return
|
|
124
|
+
function V(t) {
|
|
125
|
+
const r = t.codePointAt(0);
|
|
126
|
+
return r && r > 65535;
|
|
118
127
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
return t.style.color = e, t.style.color !== "";
|
|
128
|
+
function $(t) {
|
|
129
|
+
return t || t === 0;
|
|
122
130
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
return t && t > 65535;
|
|
126
|
-
}
|
|
127
|
-
function k(e) {
|
|
128
|
-
return e || e === 0;
|
|
129
|
-
}
|
|
130
|
-
function v(e) {
|
|
131
|
-
return !p(e) && e === window && "window" in e && e.window === e;
|
|
131
|
+
function D(t) {
|
|
132
|
+
return !x(t) && t === window && "window" in t && t.window === t;
|
|
132
133
|
}
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
L as
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
C as
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
135
|
+
V as is32Bit,
|
|
136
|
+
xr as isAllChinese,
|
|
137
|
+
q as isArguments,
|
|
138
|
+
z as isArray,
|
|
139
|
+
K as isArrayBuffer,
|
|
140
|
+
X as isArrayLike,
|
|
141
|
+
Z as isArrayLikeObject,
|
|
142
|
+
lr as isAscii,
|
|
143
|
+
W as isAsyncFunction,
|
|
144
|
+
ur as isBase64,
|
|
145
|
+
j as isBigInt,
|
|
146
|
+
F as isBlob,
|
|
147
|
+
tt as isBoolean,
|
|
148
|
+
et as isBuffer,
|
|
149
|
+
cr as isChinese,
|
|
150
|
+
U as isColorValue,
|
|
151
|
+
k as isColorValue_,
|
|
152
|
+
yr as isDataURI,
|
|
153
|
+
st as isDate,
|
|
154
|
+
ft as isElement,
|
|
155
|
+
hr as isEmail,
|
|
156
|
+
nt as isEmpty,
|
|
157
|
+
L as isEmptyArray,
|
|
158
|
+
R as isEmptyObject,
|
|
159
|
+
T as isEmptyValue,
|
|
160
|
+
lt as isEqual,
|
|
161
|
+
ut as isEqualWith,
|
|
162
|
+
xt as isError,
|
|
163
|
+
C as isEventTarget,
|
|
164
|
+
$ as isExist,
|
|
165
|
+
B as isFile,
|
|
166
|
+
bt as isFinite,
|
|
167
|
+
Er as isFullWidth,
|
|
168
|
+
gt as isFunction,
|
|
169
|
+
Mr as isHSL,
|
|
170
|
+
Pr as isHalfWidth,
|
|
171
|
+
Nr as isHash,
|
|
172
|
+
Br as isHexColor,
|
|
173
|
+
wr as isIMEI,
|
|
174
|
+
Rr as isIP,
|
|
175
|
+
Ur as isIPRange,
|
|
176
|
+
Wr as isIdentityCard,
|
|
177
|
+
St as isInteger,
|
|
175
178
|
c as isJSON,
|
|
176
179
|
w as isJSON_String,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
180
|
+
Vr as isJWT,
|
|
181
|
+
At as isLength,
|
|
182
|
+
Dr as isMACAddress,
|
|
183
|
+
Jr as isMD5,
|
|
184
|
+
It as isMap,
|
|
185
|
+
Ot as isMatch,
|
|
186
|
+
Ft as isMatchWith,
|
|
187
|
+
_r as isMimeType,
|
|
188
|
+
Gr as isMobilePhone,
|
|
189
|
+
Kr as isMobilePhoneLocales,
|
|
190
|
+
Ct as isNaN,
|
|
191
|
+
jt as isNative,
|
|
192
|
+
Lt as isNil,
|
|
193
|
+
Tt as isNull,
|
|
191
194
|
b as isNullOrUndefined,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
195
|
+
kt as isNumber,
|
|
196
|
+
$t as isObject,
|
|
197
|
+
Ht as isObjectLike,
|
|
198
|
+
qt as isPlainObject,
|
|
199
|
+
Xr as isPort,
|
|
200
|
+
O as isPromise,
|
|
201
|
+
M as isReadableStream,
|
|
202
|
+
zt as isRegExp,
|
|
203
|
+
Zr as isRgbColor,
|
|
204
|
+
Kt as isSafeInteger,
|
|
205
|
+
te as isSemVer,
|
|
206
|
+
Xt as isSet,
|
|
207
|
+
ee as isSlug,
|
|
208
|
+
Zt as isString,
|
|
209
|
+
se as isStrongPassword,
|
|
210
|
+
tr as isSymbol,
|
|
211
|
+
er as isTypedArray,
|
|
212
|
+
fe as isURL,
|
|
213
|
+
ne as isUUID,
|
|
214
|
+
sr as isUndefined,
|
|
215
|
+
le as isVariableWidth,
|
|
216
|
+
fr as isWeakMap,
|
|
217
|
+
nr as isWeakSet,
|
|
218
|
+
D as isWindow
|
|
216
219
|
};
|
package/is/lib/isAscii.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 2025-12-
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return i
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
|
+
import s from "../../assert/index.js";
|
|
3
|
+
const t = /^[\x00-\x7F]+$/;
|
|
4
|
+
function a(i) {
|
|
5
|
+
return s({ value: i }, "isAscii"), t.test(i);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as default
|
|
9
9
|
};
|
package/is/lib/isBase64.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* 2025-12-
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
2
|
import r from "lodash/defaults";
|
|
3
|
-
import t from "
|
|
4
|
-
const i = /^[A-Za-z0-9+/]+={0,2}$/,
|
|
3
|
+
import t from "../../assert/index.js";
|
|
4
|
+
const i = /^[A-Za-z0-9+/]+={0,2}$/, l = /^[A-Za-z0-9+/]+$/, f = /^[A-Za-z0-9_-]+={0,2}$/, n = /^[A-Za-z0-9_-]+$/;
|
|
5
5
|
function s(e, a) {
|
|
6
|
-
if (t(e), a = r(a, { urlSafe: !1, padding: !a?.urlSafe }), e === "") return !0;
|
|
6
|
+
if (t({ value: e }, "isBase64"), a = r(a, { urlSafe: !1, padding: !a?.urlSafe }), e === "") return !0;
|
|
7
7
|
if (a.padding && e.length % 4 !== 0) return !1;
|
|
8
8
|
let d;
|
|
9
|
-
return a.urlSafe ? d = a.padding ? f :
|
|
9
|
+
return a.urlSafe ? d = a.padding ? f : n : d = a.padding ? i : l, (!a.padding || e.length % 4 === 0) && d.test(e);
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
s as default
|
package/is/lib/isChinese.js
CHANGED
package/is/lib/isDataURI.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/* 2025-12-
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
const a =
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
|
+
import l from "../../assert/index.js";
|
|
3
|
+
const n = /^[a-z]+\/[a-z0-9\-+._]+$/i, f = /^[a-z-]+=[a-z0-9-]+$/i, o = /^[a-z0-9!$&'()*+,;=\-._~:@/?%\s]*$/i;
|
|
4
|
+
function c(s) {
|
|
5
|
+
l({ value: s }, "isDataURI");
|
|
6
|
+
const a = s.split(",");
|
|
7
7
|
if (a.length < 2)
|
|
8
8
|
return !1;
|
|
9
|
-
const e = a.shift().trim().split(";"),
|
|
10
|
-
if (
|
|
9
|
+
const e = a.shift().trim().split(";"), i = e.shift();
|
|
10
|
+
if (i.slice(0, 5) !== "data:")
|
|
11
11
|
return !1;
|
|
12
|
-
const r =
|
|
13
|
-
if (r !== "" && !
|
|
12
|
+
const r = i.slice(5);
|
|
13
|
+
if (r !== "" && !n.test(r))
|
|
14
14
|
return !1;
|
|
15
15
|
for (let t = 0; t < e.length; t++)
|
|
16
16
|
if (!(t === e.length - 1 && e[t].toLowerCase() === "base64") && !f.test(e[t]))
|
|
@@ -21,5 +21,5 @@ function u(i) {
|
|
|
21
21
|
return !0;
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
c as default
|
|
25
25
|
};
|
package/is/lib/isEmail.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 2025-12-
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
2
|
import x from "lodash/defaults";
|
|
3
3
|
import m from "lodash/isObject";
|
|
4
4
|
import d from "lodash/isUndefined";
|
|
5
|
+
import _ from "../../assert/index.js";
|
|
5
6
|
import o from "./isFQDN.js";
|
|
6
7
|
import u from "./isIP.js";
|
|
7
|
-
import _ from "./util/assertString.js";
|
|
8
8
|
const F = {
|
|
9
9
|
allow_display_name: !1,
|
|
10
10
|
allow_underscores: !1,
|
|
@@ -13,46 +13,46 @@ const F = {
|
|
|
13
13
|
require_tld: !0,
|
|
14
14
|
blacklisted_chars: "",
|
|
15
15
|
ignore_max_length: !1
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
const e =
|
|
19
|
-
return !(!e.trim() || /[.";<>]/.test(e) && (e ===
|
|
16
|
+
}, h = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i, g = /^[a-z\d!#$%&'*+\-/=?^_`{|}~]+$/i, p = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i, w = /^[a-z\d!#$%&'*+\-/=?^_`{|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i, b = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i, D = 254;
|
|
17
|
+
function y(t) {
|
|
18
|
+
const e = t.replace(/^"(.+)"$/, "$1");
|
|
19
|
+
return !(!e.trim() || /[.";<>]/.test(e) && (e === t || !(e.split('"').length === e.split('\\"').length)));
|
|
20
20
|
}
|
|
21
|
-
function f(
|
|
22
|
-
_(
|
|
23
|
-
let i,
|
|
24
|
-
m(e) ? (i = e.min || 0,
|
|
25
|
-
const l = encodeURI(
|
|
26
|
-
return l >= i && (d(
|
|
21
|
+
function f(t, e) {
|
|
22
|
+
_({ value: t }, "isByteLength");
|
|
23
|
+
let i, a;
|
|
24
|
+
m(e) ? (i = e.min || 0, a = e.max) : (i = arguments[1], a = arguments[2]);
|
|
25
|
+
const l = encodeURI(t).split(/%..|./).length - 1;
|
|
26
|
+
return l >= i && (d(a) || l <= a);
|
|
27
27
|
}
|
|
28
|
-
function C(
|
|
29
|
-
if (_(
|
|
30
|
-
const r =
|
|
28
|
+
function C(t, e) {
|
|
29
|
+
if (_({ value: t }, "isEmail"), e = x(e, F), e.require_display_name || e.allow_display_name) {
|
|
30
|
+
const r = t.match(h);
|
|
31
31
|
if (r) {
|
|
32
32
|
let s = r[1];
|
|
33
|
-
if (
|
|
33
|
+
if (t = t.replace(s, "").replace(/(^<|>$)/g, ""), s.endsWith(" ") && (s = s.slice(0, -1)), !y(s))
|
|
34
34
|
return !1;
|
|
35
35
|
} else if (e.require_display_name)
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
|
-
if (!e.ignore_max_length &&
|
|
38
|
+
if (!e.ignore_max_length && t.length > D)
|
|
39
39
|
return !1;
|
|
40
|
-
const i =
|
|
41
|
-
|
|
40
|
+
const i = t.split("@"), a = i.pop();
|
|
41
|
+
a.toLowerCase();
|
|
42
42
|
let l = i.join("@");
|
|
43
|
-
if (e.ignore_max_length === !1 && (!f(l, { max: 64 }) || !f(
|
|
43
|
+
if (e.ignore_max_length === !1 && (!f(l, { max: 64 }) || !f(a, { max: 254 })))
|
|
44
44
|
return !1;
|
|
45
|
-
if (!o(
|
|
45
|
+
if (!o(a, {
|
|
46
46
|
require_tld: e.require_tld,
|
|
47
47
|
ignore_max_length: e.ignore_max_length,
|
|
48
48
|
allow_underscores: e.allow_underscores
|
|
49
49
|
})) {
|
|
50
50
|
if (!e.allow_ip_domain)
|
|
51
51
|
return !1;
|
|
52
|
-
if (!u(
|
|
53
|
-
if (!
|
|
52
|
+
if (!u(a)) {
|
|
53
|
+
if (!a.startsWith("[") || !a.endsWith("]"))
|
|
54
54
|
return !1;
|
|
55
|
-
const r =
|
|
55
|
+
const r = a.slice(1, -1);
|
|
56
56
|
if (r.length === 0 || !u(r))
|
|
57
57
|
return !1;
|
|
58
58
|
}
|
|
@@ -61,7 +61,7 @@ function C(a, e) {
|
|
|
61
61
|
return !1;
|
|
62
62
|
if (l[0] === '"' && l[l.length - 1] === '"')
|
|
63
63
|
return l = l.slice(1, l.length - 1), e.allow_utf8_local_part ? b.test(l) : p.test(l);
|
|
64
|
-
const c = e.allow_utf8_local_part ? w :
|
|
64
|
+
const c = e.allow_utf8_local_part ? w : g, n = l.split(".");
|
|
65
65
|
for (let r = 0; r < n.length; r++)
|
|
66
66
|
if (!c.test(n[r]))
|
|
67
67
|
return !1;
|
package/is/lib/isFQDN.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
/* 2025-12-
|
|
2
|
-
import
|
|
3
|
-
import a from "
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
|
+
import r from "lodash/defaults";
|
|
3
|
+
import a from "../../assert/index.js";
|
|
4
4
|
const n = {
|
|
5
5
|
require_tld: !0,
|
|
6
|
+
// 必须包含顶级域名(.com/.cn等)
|
|
6
7
|
allow_underscores: !1,
|
|
8
|
+
// 是否允许下划线 (如 my_site.com)
|
|
7
9
|
allow_trailing_dot: !1,
|
|
10
|
+
// 是否允许结尾的点 (如 www.example.com.)
|
|
8
11
|
allow_numeric_tld: !1,
|
|
12
|
+
// 是否允许纯数字TLD (如 example.123)
|
|
9
13
|
allow_wildcard: !1,
|
|
14
|
+
// 是否允许通配符 (如 *.example.com)
|
|
10
15
|
ignore_max_length: !1
|
|
16
|
+
// 是否忽略每部分63字符限制
|
|
11
17
|
};
|
|
12
18
|
function _(e, l) {
|
|
13
|
-
a(e), l =
|
|
14
|
-
const t = e.split("."),
|
|
19
|
+
a({ value: e }, "isFQDN"), l = r(l, n), l.allow_trailing_dot && e[e.length - 1] === "." && (e = e.substring(0, e.length - 1)), l.allow_wildcard === !0 && e.indexOf("*.") === 0 && (e = e.substring(2));
|
|
20
|
+
const t = e.split("."), u = t[t.length - 1];
|
|
15
21
|
return l.require_tld && (t.length < 2 || !l.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(
|
|
16
|
-
|
|
17
|
-
) || /\s/.test(
|
|
22
|
+
u
|
|
23
|
+
) || /\s/.test(u)) || !l.allow_numeric_tld && /^\d+$/.test(u) ? !1 : t.every((f) => !(f.length > 63 && !l.ignore_max_length || !/^[a-z_\u00a1-\uffff0-9-]+$/i.test(f) || /[\uff01-\uff5e]/.test(f) || /^-|-$/.test(f) || !l.allow_underscores && /_/.test(f)));
|
|
18
24
|
}
|
|
19
25
|
export {
|
|
20
26
|
_ as default
|
package/is/lib/isFullWidth.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 2025-12-
|
|
2
|
-
import
|
|
1
|
+
/* 2025-12-22 09:15:24 */
|
|
2
|
+
import F from "../../assert/index.js";
|
|
3
3
|
const t = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
|
|
4
|
-
function
|
|
5
|
-
return u
|
|
4
|
+
function i(u) {
|
|
5
|
+
return F({ value: u }, "isFullWidth"), t.test(u);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
i as default,
|
|
9
9
|
t as fullWidth
|
|
10
10
|
};
|