mazey 3.11.3 → 3.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,51 +59,51 @@ There are some examples maintained by hand below. For more information, please c
59
59
 
60
60
  ### Table of Contents
61
61
 
62
- <!-- toc - begin -->
63
- - Generated with ❤️
64
- - [Load Resource](#load-resource)
65
- - [loadScript](#loadscript)
66
- - [loadScriptIfUndefined](#loadscriptifundefined)
67
- - [loadCSS](#loadcss)
68
- - [loadImage](#loadimage)
69
- - [windowLoaded](#windowloaded)
70
- - [Util](#util)
71
- - [isNumber](#isnumber)
72
- - [isJSONString](#isjsonstring)
73
- - [isValidData](#isvaliddata)
74
- - [genRndNumString](#genrndnumstring)
75
- - [formatDate](#formatdate)
76
- - [debounce](#debounce)
77
- - [throttle](#throttle)
78
- - [convertCamelToKebab](#convertcameltokebab)
79
- - [convertCamelToUnder](#convertcameltounder)
80
- - [deepCopy](#deepcopy)
81
- - [URL](#url)
82
- - [getQueryParam](#getqueryparam)
83
- - [getUrlParam](#geturlparam)
84
- - [getHashQueryParam](#gethashqueryparam)
85
- - [getDomain](#getdomain)
86
- - [updateQueryParam](#updatequeryparam)
87
- - [isValidUrl](#isvalidurl)
88
- - [isValidHttpUrl](#isvalidhttpurl)
89
- - [Cache Data](#cache-data)
90
- - [Cookie](#cookie)
91
- - [Storage](#storage)
92
- - [DOM](#dom)
93
- - [addStyle](#addstyle)
94
- - [Class](#class)
95
- - [newLine](#newline)
96
- - [Calculate and Formula](#calculate-and-formula)
97
- - [inRate](#inrate)
98
- - [longestComSubstring](#longestcomsubstring)
99
- - [longestComSubsequence](#longestcomsubsequence)
100
- - [Browser Information](#browser-information)
101
- - [getBrowserInfo](#getbrowserinfo)
102
- - [isSafePWAEnv](#issafepwaenv)
103
- - [Web Performance](#web-performance)
104
- - [getPerformance](#getperformance)
105
- - [Debug](#debug)
106
- - [genCustomConsole](#gencustomconsole)
62
+ <!-- toc - begin -->
63
+ - Generated with ❤️
64
+ - [Load Resource](#load-resource)
65
+ - [loadScript](#loadscript)
66
+ - [loadScriptIfUndefined](#loadscriptifundefined)
67
+ - [loadCSS](#loadcss)
68
+ - [loadImage](#loadimage)
69
+ - [windowLoaded](#windowloaded)
70
+ - [Util](#util)
71
+ - [isNumber](#isnumber)
72
+ - [isJSONString](#isjsonstring)
73
+ - [isValidData](#isvaliddata)
74
+ - [genRndNumString](#genrndnumstring)
75
+ - [formatDate](#formatdate)
76
+ - [debounce](#debounce)
77
+ - [throttle](#throttle)
78
+ - [convertCamelToKebab](#convertcameltokebab)
79
+ - [convertCamelToUnder](#convertcameltounder)
80
+ - [deepCopy](#deepcopy)
81
+ - [URL](#url)
82
+ - [getQueryParam](#getqueryparam)
83
+ - [getUrlParam](#geturlparam)
84
+ - [getHashQueryParam](#gethashqueryparam)
85
+ - [getDomain](#getdomain)
86
+ - [updateQueryParam](#updatequeryparam)
87
+ - [isValidUrl](#isvalidurl)
88
+ - [isValidHttpUrl](#isvalidhttpurl)
89
+ - [Cache Data](#cache-data)
90
+ - [Cookie](#cookie)
91
+ - [Storage](#storage)
92
+ - [DOM](#dom)
93
+ - [addStyle](#addstyle)
94
+ - [Class](#class)
95
+ - [newLine](#newline)
96
+ - [Calculate and Formula](#calculate-and-formula)
97
+ - [inRate](#inrate)
98
+ - [longestComSubstring](#longestcomsubstring)
99
+ - [longestComSubsequence](#longestcomsubsequence)
100
+ - [Browser Information](#browser-information)
101
+ - [getBrowserInfo](#getbrowserinfo)
102
+ - [isSafePWAEnv](#issafepwaenv)
103
+ - [Web Performance](#web-performance)
104
+ - [getPerformance](#getperformance)
105
+ - [Debug](#debug)
106
+ - [genCustomConsole](#gencustomconsole)
107
107
  <!-- toc - end -->
108
108
 
109
109
  ### Load Resource
package/lib/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * mazey v3.11.3 https://www.npmjs.com/package/mazey
2
+ * mazey v3.11.5 https://www.npmjs.com/package/mazey
3
3
  * (c) 2018-2023 Mazey Chu
4
4
  * Released under the MIT License.
5
5
  */
package/lib/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * mazey v3.11.3 https://www.npmjs.com/package/mazey
2
+ * mazey v3.11.5 https://www.npmjs.com/package/mazey
3
3
  * (c) 2018-2023 Mazey Chu
4
4
  * Released under the MIT License.
5
5
  */
package/lib/mazey.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * mazey v3.11.3 https://www.npmjs.com/package/mazey
2
+ * mazey v3.11.5 https://www.npmjs.com/package/mazey
3
3
  * (c) 2018-2023 Mazey Chu
4
4
  * Released under the MIT License.
5
5
  */
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @author: Mazey Chu
3
+ */
4
+
5
+ interface BrowserInfo {
6
+ engine: string; // webkit gecko presto trident
7
+ engineVs: string;
8
+ platform: string; // desktop mobile
9
+ supporter: string; // chrome safari firefox opera iexplore edge
10
+ supporterVs: string;
11
+ system: string; // windows macos linux android ios
12
+ systemVs: string;
13
+ shell?: string; // wechat qq uc 360 2345 sougou liebao maxthon
14
+ shellVs?: string;
15
+ appleType?: string;
16
+ }
17
+
18
+ interface DefineListeners {
19
+ [key: string]: any;
20
+ }
21
+
22
+ type TestUa = (regexp: RegExp) => boolean;
23
+ type TestVs = (regexp: RegExp) => string;
24
+
25
+ interface UrlParams {
26
+ [key: string]: string | string[];
27
+ }
28
+
29
+ type ThrottleFunc<T extends (...args: any[]) => any> = (...args: Parameters<T>) => ReturnType<T> | null;
30
+
31
+ type DebounceFunc<T extends (...args: any[]) => any> = (...args: Parameters<T>) => ReturnType<T>;
32
+
33
+ interface IsNumberOptions {
34
+ isNaNAsNumber?: boolean;
35
+ isInfinityAsNumber?: boolean;
36
+ isUnFiniteAsNumber?: boolean;
37
+ }
38
+
39
+ type AnyFunction = (...args: any[]) => any;
40
+
41
+ interface ZResResponse {
42
+ status: number;
43
+ data: {
44
+ code: number;
45
+ };
46
+ }
47
+
48
+ interface ZResIsValidResOptions {
49
+ validStatusRange?: [number, number];
50
+ validCode?: number[];
51
+ }
52
+
53
+ interface RepeatUntilOptions {
54
+ interval?: number;
55
+ times?: number;
56
+ context?: any;
57
+ args?: Array<any>;
58
+ }
59
+
60
+ type LoadScriptReturns = Promise<boolean | string | Error | void>;
61
+
62
+ type SimpleType = string | number | boolean | null | undefined;
63
+ type SimpleObject = {
64
+ [key: string]: simpleType | simpleType[] | simpleObject | simpleObject[];
65
+ };
66
+
67
+ type UnknownObject = any; // Record<string, unknown>;
68
+ type UnknownFnParams = any[]; // | Record<string, unknown> | string | number | boolean | null | undefined;
69
+ type UnknownFnReturn = any;
70
+ type UnknownFn = (...args: UnknownFnParams) => UnknownFnReturn;
71
+
72
+ interface UnknownWindow {
73
+ [key: string]: any;
74
+ }
75
+
76
+ export { AnyFunction, BrowserInfo, DebounceFunc, DefineListeners, IsNumberOptions, LoadScriptReturns, RepeatUntilOptions, SimpleObject, SimpleType, TestUa, TestVs, ThrottleFunc, UnknownFn, UnknownFnParams, UnknownFnReturn, UnknownObject, UnknownWindow, UrlParams, ZResIsValidResOptions, ZResResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mazey",
3
- "version": "3.11.3",
3
+ "version": "3.11.5",
4
4
  "description": "A functional library for daily front-end work.",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",