umaki 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/_virtual/_rolldown/runtime.cjs +22 -0
- package/dist/index.cjs +137 -127
- package/dist/index.es.js +17 -71
- package/dist/libs/callback/index.cjs +15 -5
- package/dist/libs/callback/index.es.js +12 -4
- package/dist/libs/callback/tap-async.cjs +5 -6
- package/dist/libs/callback/tap-async.es.js +6 -7
- package/dist/libs/callback/tap.cjs +4 -5
- package/dist/libs/callback/tap.es.js +5 -6
- package/dist/libs/config/_internal.cjs +2 -4
- package/dist/libs/config/_internal.es.js +3 -4
- package/dist/libs/config/default-config.cjs +2 -5
- package/dist/libs/config/default-config.es.js +3 -6
- package/dist/libs/config/get-config.cjs +6 -7
- package/dist/libs/config/get-config.es.js +6 -8
- package/dist/libs/config/index.cjs +18 -8
- package/dist/libs/config/index.es.js +12 -6
- package/dist/libs/config/set-config.cjs +13 -10
- package/dist/libs/config/set-config.es.js +13 -10
- package/dist/libs/control/bg-scroll-stop.cjs +6 -7
- package/dist/libs/control/bg-scroll-stop.es.js +6 -7
- package/dist/libs/control/copy-to-clipboard.cjs +9 -12
- package/dist/libs/control/copy-to-clipboard.es.js +10 -13
- package/dist/libs/control/index.cjs +21 -11
- package/dist/libs/control/index.es.js +12 -7
- package/dist/libs/control/pd.cjs +2 -3
- package/dist/libs/control/pd.es.js +3 -4
- package/dist/libs/control/scroll-to-hash.cjs +28 -35
- package/dist/libs/control/scroll-to-hash.es.js +29 -36
- package/dist/libs/control/video-play-control.cjs +17 -20
- package/dist/libs/control/video-play-control.es.js +17 -20
- package/dist/libs/convert/change-date-string-to-specific-format.cjs +13 -12
- package/dist/libs/convert/change-date-string-to-specific-format.es.js +5 -8
- package/dist/libs/convert/hex-to-rgb.cjs +15 -20
- package/dist/libs/convert/hex-to-rgb.es.js +16 -21
- package/dist/libs/convert/index.cjs +19 -9
- package/dist/libs/convert/index.es.js +12 -6
- package/dist/libs/convert/json-string-to-json-object.cjs +7 -8
- package/dist/libs/convert/json-string-to-json-object.es.js +8 -9
- package/dist/libs/convert/rgb-to-hex.cjs +6 -7
- package/dist/libs/convert/rgb-to-hex.es.js +7 -8
- package/dist/libs/eventControl/debounce.cjs +11 -14
- package/dist/libs/eventControl/debounce.es.js +12 -15
- package/dist/libs/eventControl/index.cjs +15 -5
- package/dist/libs/eventControl/index.es.js +12 -4
- package/dist/libs/eventControl/throttle.cjs +11 -14
- package/dist/libs/eventControl/throttle.es.js +12 -15
- package/dist/libs/get/get-aspect-ratio.cjs +9 -9
- package/dist/libs/get/get-aspect-ratio.es.js +9 -9
- package/dist/libs/get/get-class-names.cjs +3 -5
- package/dist/libs/get/get-class-names.es.js +4 -6
- package/dist/libs/get/get-document-height.cjs +4 -5
- package/dist/libs/get/get-document-height.es.js +5 -6
- package/dist/libs/get/get-event-paths.cjs +16 -21
- package/dist/libs/get/get-event-paths.es.js +17 -22
- package/dist/libs/get/get-gcd.cjs +8 -11
- package/dist/libs/get/get-gcd.es.js +8 -11
- package/dist/libs/get/get-gravatar-url.cjs +8 -10
- package/dist/libs/get/get-gravatar-url.es.js +6 -10
- package/dist/libs/get/get-orientation.cjs +4 -8
- package/dist/libs/get/get-orientation.es.js +5 -9
- package/dist/libs/get/get-parent-list.cjs +5 -6
- package/dist/libs/get/get-parent-list.es.js +6 -7
- package/dist/libs/get/get-query-params.cjs +19 -20
- package/dist/libs/get/get-query-params.d.ts +1 -0
- package/dist/libs/get/get-query-params.es.js +18 -21
- package/dist/libs/get/get-random-int.cjs +8 -15
- package/dist/libs/get/get-random-int.es.js +9 -16
- package/dist/libs/get/get-relative-time.cjs +41 -25
- package/dist/libs/get/get-relative-time.es.js +42 -26
- package/dist/libs/get/get-rem.cjs +4 -8
- package/dist/libs/get/get-rem.es.js +5 -9
- package/dist/libs/get/get-rendered-line-height.cjs +49 -54
- package/dist/libs/get/get-rendered-line-height.es.js +50 -55
- package/dist/libs/get/get-scrollbar-width.cjs +4 -5
- package/dist/libs/get/get-scrollbar-width.es.js +5 -6
- package/dist/libs/get/get-session-storage.cjs +8 -7
- package/dist/libs/get/get-session-storage.es.js +6 -7
- package/dist/libs/get/get-string-length.cjs +3 -4
- package/dist/libs/get/get-string-length.es.js +3 -4
- package/dist/libs/get/get-style-property-value-to-number.cjs +3 -4
- package/dist/libs/get/get-style-property-value-to-number.es.js +3 -4
- package/dist/libs/get/get-style-property-value.cjs +4 -5
- package/dist/libs/get/get-style-property-value.es.js +5 -6
- package/dist/libs/get/get-ua-data.cjs +20 -21
- package/dist/libs/get/get-ua-data.es.js +17 -20
- package/dist/libs/get/index.cjs +49 -39
- package/dist/libs/get/index.es.js +14 -23
- package/dist/libs/is/check-device-size.cjs +6 -9
- package/dist/libs/is/check-device-size.es.js +6 -9
- package/dist/libs/is/index.cjs +33 -23
- package/dist/libs/is/index.es.js +13 -14
- package/dist/libs/is/is-after-date-time.cjs +7 -8
- package/dist/libs/is/is-after-date-time.es.js +5 -8
- package/dist/libs/is/is-between-date-time.cjs +12 -12
- package/dist/libs/is/is-between-date-time.es.js +7 -10
- package/dist/libs/is/is-exist-all-elements.cjs +3 -4
- package/dist/libs/is/is-exist-all-elements.es.js +4 -5
- package/dist/libs/is/is-in-viewport.cjs +60 -63
- package/dist/libs/is/is-in-viewport.es.js +61 -64
- package/dist/libs/is/is-ipad.cjs +8 -11
- package/dist/libs/is/is-ipad.es.js +7 -10
- package/dist/libs/is/is-key-exists.cjs +3 -4
- package/dist/libs/is/is-key-exists.es.js +4 -5
- package/dist/libs/is/is-online.cjs +4 -7
- package/dist/libs/is/is-online.es.js +5 -8
- package/dist/libs/is/is-safari.cjs +6 -9
- package/dist/libs/is/is-safari.es.js +6 -9
- package/dist/libs/is/is-scrollable.cjs +5 -6
- package/dist/libs/is/is-scrollable.es.js +6 -7
- package/dist/libs/is/is-touch-support.cjs +7 -9
- package/dist/libs/is/is-touch-support.es.js +8 -10
- package/dist/libs/remove/index.cjs +19 -9
- package/dist/libs/remove/index.es.js +12 -6
- package/dist/libs/remove/remove-all-html-tags.cjs +10 -10
- package/dist/libs/remove/remove-all-html-tags.es.js +8 -10
- package/dist/libs/remove/remove-attribute.cjs +3 -4
- package/dist/libs/remove/remove-attribute.es.js +4 -5
- package/dist/libs/remove/remove-session-storage.cjs +6 -5
- package/dist/libs/remove/remove-session-storage.es.js +4 -5
- package/dist/libs/remove/remove-style-property-value.cjs +4 -5
- package/dist/libs/remove/remove-style-property-value.es.js +5 -6
- package/dist/libs/security/html-sanitize.cjs +15 -11
- package/dist/libs/security/html-sanitize.es.js +13 -12
- package/dist/libs/security/index.cjs +14 -4
- package/dist/libs/security/index.es.js +12 -5
- package/dist/libs/set/index.cjs +23 -13
- package/dist/libs/set/index.es.js +12 -8
- package/dist/libs/set/set-100vh.cjs +5 -6
- package/dist/libs/set/set-100vh.es.js +6 -7
- package/dist/libs/set/set-100vw.cjs +5 -6
- package/dist/libs/set/set-100vw.es.js +6 -7
- package/dist/libs/set/set-attribute.cjs +3 -4
- package/dist/libs/set/set-attribute.es.js +4 -5
- package/dist/libs/set/set-scroll-position-to-center.cjs +9 -8
- package/dist/libs/set/set-scroll-position-to-center.es.js +10 -9
- package/dist/libs/set/set-session-storage.cjs +6 -5
- package/dist/libs/set/set-session-storage.es.js +4 -5
- package/dist/libs/set/set-style-property-value.cjs +4 -5
- package/dist/libs/set/set-style-property-value.es.js +5 -6
- package/dist/libs/to/index.cjs +15 -5
- package/dist/libs/to/index.es.js +12 -4
- package/dist/libs/to/to-boolean.cjs +3 -4
- package/dist/libs/to/to-boolean.es.js +4 -5
- package/dist/libs/to/to-positive-number.cjs +2 -3
- package/dist/libs/to/to-positive-number.es.js +3 -4
- package/dist/libs/transform/index.cjs +13 -3
- package/dist/libs/transform/index.es.js +12 -4
- package/dist/libs/transform/wrap-text-with-spans.cjs +15 -20
- package/dist/libs/transform/wrap-text-with-spans.es.js +15 -20
- package/dist/libs/wait/index.cjs +15 -5
- package/dist/libs/wait/index.es.js +12 -4
- package/dist/libs/wait/sleep.cjs +3 -4
- package/dist/libs/wait/sleep.es.js +4 -5
- package/dist/libs/wait/wait-for-all-media-loaded.cjs +29 -41
- package/dist/libs/wait/wait-for-all-media-loaded.es.js +30 -42
- package/package.json +17 -14
package/README.md
CHANGED
|
@@ -42,7 +42,9 @@ Category subpaths are also available to keep bundles small:
|
|
|
42
42
|
import { debounce } from "umaki/eventControl";
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
CommonJS (`require("umaki")`) is supported as well. Some dependencies are ESM-only, so loading umaki with `require` from Node.js needs a version that supports `require(esm)
|
|
45
|
+
CommonJS (`require("umaki")`) is supported as well. Some dependencies are ESM-only, so loading umaki with `require` from Node.js needs a version that supports `require(esm)`.
|
|
46
|
+
|
|
47
|
+
umaki requires Node.js `^22.22.2 || ^24.15.0 || >=26.0.0`. Node.js 20 users should stay on umaki 0.13.x.
|
|
46
48
|
|
|
47
49
|
## Configuration
|
|
48
50
|
|
|
@@ -564,8 +566,13 @@ const customParamWithOptions = getQueryParams("id", {
|
|
|
564
566
|
searchString: "?id=123",
|
|
565
567
|
parseOptions: { arrayFormat: "bracket" },
|
|
566
568
|
});
|
|
569
|
+
|
|
570
|
+
// A repeated key returns an array
|
|
571
|
+
getQueryParams("a", { searchString: "?a=1&a=2" }); // [1, 2]
|
|
567
572
|
```
|
|
568
573
|
|
|
574
|
+
Percent-encoded bytes that are not valid UTF-8 are decoded to `U+FFFD`, like `URLSearchParams`.
|
|
575
|
+
|
|
569
576
|
[View file →](src/libs/get/get-query-params.ts)
|
|
570
577
|
|
|
571
578
|
### getRandomInt
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1,128 +1,138 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.14.0
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
124
|
-
exports.toBoolean =
|
|
125
|
-
exports.toPositiveNumber =
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
13
|
+
const require_tap = require("./libs/callback/tap.cjs");
|
|
14
|
+
const require_tap_async = require("./libs/callback/tap-async.cjs");
|
|
15
|
+
const require_default_config = require("./libs/config/default-config.cjs");
|
|
16
|
+
const require_get_config = require("./libs/config/get-config.cjs");
|
|
17
|
+
const require_set_config = require("./libs/config/set-config.cjs");
|
|
18
|
+
const require_get_scrollbar_width = require("./libs/get/get-scrollbar-width.cjs");
|
|
19
|
+
const require_bg_scroll_stop = require("./libs/control/bg-scroll-stop.cjs");
|
|
20
|
+
const require_copy_to_clipboard = require("./libs/control/copy-to-clipboard.cjs");
|
|
21
|
+
const require_pd = require("./libs/control/pd.cjs");
|
|
22
|
+
const require_scroll_to_hash = require("./libs/control/scroll-to-hash.cjs");
|
|
23
|
+
const require_to_boolean = require("./libs/to/to-boolean.cjs");
|
|
24
|
+
const require_video_play_control = require("./libs/control/video-play-control.cjs");
|
|
25
|
+
const require_change_date_string_to_specific_format = require("./libs/convert/change-date-string-to-specific-format.cjs");
|
|
26
|
+
const require_hex_to_rgb = require("./libs/convert/hex-to-rgb.cjs");
|
|
27
|
+
const require_json_string_to_json_object = require("./libs/convert/json-string-to-json-object.cjs");
|
|
28
|
+
const require_rgb_to_hex = require("./libs/convert/rgb-to-hex.cjs");
|
|
29
|
+
const require_debounce = require("./libs/eventControl/debounce.cjs");
|
|
30
|
+
const require_throttle = require("./libs/eventControl/throttle.cjs");
|
|
31
|
+
const require_to_positive_number = require("./libs/to/to-positive-number.cjs");
|
|
32
|
+
const require_get_gcd = require("./libs/get/get-gcd.cjs");
|
|
33
|
+
const require_get_aspect_ratio = require("./libs/get/get-aspect-ratio.cjs");
|
|
34
|
+
const require_get_class_names = require("./libs/get/get-class-names.cjs");
|
|
35
|
+
const require_get_document_height = require("./libs/get/get-document-height.cjs");
|
|
36
|
+
const require_get_event_paths = require("./libs/get/get-event-paths.cjs");
|
|
37
|
+
const require_get_gravatar_url = require("./libs/get/get-gravatar-url.cjs");
|
|
38
|
+
const require_get_orientation = require("./libs/get/get-orientation.cjs");
|
|
39
|
+
const require_get_parent_list = require("./libs/get/get-parent-list.cjs");
|
|
40
|
+
const require_get_query_params = require("./libs/get/get-query-params.cjs");
|
|
41
|
+
const require_get_random_int = require("./libs/get/get-random-int.cjs");
|
|
42
|
+
const require_get_relative_time = require("./libs/get/get-relative-time.cjs");
|
|
43
|
+
const require_get_rem = require("./libs/get/get-rem.cjs");
|
|
44
|
+
const require_get_rendered_line_height = require("./libs/get/get-rendered-line-height.cjs");
|
|
45
|
+
const require_get_session_storage = require("./libs/get/get-session-storage.cjs");
|
|
46
|
+
const require_get_string_length = require("./libs/get/get-string-length.cjs");
|
|
47
|
+
const require_get_style_property_value = require("./libs/get/get-style-property-value.cjs");
|
|
48
|
+
const require_get_style_property_value_to_number = require("./libs/get/get-style-property-value-to-number.cjs");
|
|
49
|
+
const require_is_touch_support = require("./libs/is/is-touch-support.cjs");
|
|
50
|
+
const require_get_ua_data = require("./libs/get/get-ua-data.cjs");
|
|
51
|
+
const require_check_device_size = require("./libs/is/check-device-size.cjs");
|
|
52
|
+
const require_is_after_date_time = require("./libs/is/is-after-date-time.cjs");
|
|
53
|
+
const require_is_between_date_time = require("./libs/is/is-between-date-time.cjs");
|
|
54
|
+
const require_is_exist_all_elements = require("./libs/is/is-exist-all-elements.cjs");
|
|
55
|
+
const require_is_in_viewport = require("./libs/is/is-in-viewport.cjs");
|
|
56
|
+
const require_is_ipad = require("./libs/is/is-ipad.cjs");
|
|
57
|
+
const require_is_key_exists = require("./libs/is/is-key-exists.cjs");
|
|
58
|
+
const require_is_online = require("./libs/is/is-online.cjs");
|
|
59
|
+
const require_is_safari = require("./libs/is/is-safari.cjs");
|
|
60
|
+
const require_is_scrollable = require("./libs/is/is-scrollable.cjs");
|
|
61
|
+
const require_remove_all_html_tags = require("./libs/remove/remove-all-html-tags.cjs");
|
|
62
|
+
const require_remove_attribute = require("./libs/remove/remove-attribute.cjs");
|
|
63
|
+
const require_remove_session_storage = require("./libs/remove/remove-session-storage.cjs");
|
|
64
|
+
const require_remove_style_property_value = require("./libs/remove/remove-style-property-value.cjs");
|
|
65
|
+
const require_html_sanitize = require("./libs/security/html-sanitize.cjs");
|
|
66
|
+
const require_set_100vh = require("./libs/set/set-100vh.cjs");
|
|
67
|
+
const require_set_100vw = require("./libs/set/set-100vw.cjs");
|
|
68
|
+
const require_set_attribute = require("./libs/set/set-attribute.cjs");
|
|
69
|
+
const require_set_scroll_position_to_center = require("./libs/set/set-scroll-position-to-center.cjs");
|
|
70
|
+
const require_set_session_storage = require("./libs/set/set-session-storage.cjs");
|
|
71
|
+
const require_set_style_property_value = require("./libs/set/set-style-property-value.cjs");
|
|
72
|
+
const require_wrap_text_with_spans = require("./libs/transform/wrap-text-with-spans.cjs");
|
|
73
|
+
const require_sleep = require("./libs/wait/sleep.cjs");
|
|
74
|
+
const require_wait_for_all_media_loaded = require("./libs/wait/wait-for-all-media-loaded.cjs");
|
|
75
|
+
exports.bgScrollStop = require_bg_scroll_stop.bgScrollStop;
|
|
76
|
+
exports.changeDateStringToSpecificFormat = require_change_date_string_to_specific_format.changeDateStringToSpecificFormat;
|
|
77
|
+
exports.checkDeviceSize = require_check_device_size.checkDeviceSize;
|
|
78
|
+
exports.copyToClipboard = require_copy_to_clipboard.copyToClipboard;
|
|
79
|
+
exports.debounce = require_debounce.debounce;
|
|
80
|
+
exports.defaultConfig = require_default_config.defaultConfig;
|
|
81
|
+
exports.getAspectRatio = require_get_aspect_ratio.getAspectRatio;
|
|
82
|
+
exports.getClassNames = require_get_class_names.getClassNames;
|
|
83
|
+
exports.getConfig = require_get_config.getConfig;
|
|
84
|
+
exports.getConfigValue = require_get_config.getConfigValue;
|
|
85
|
+
exports.getDocumentHeight = require_get_document_height.getDocumentHeight;
|
|
86
|
+
exports.getEventPaths = require_get_event_paths.getEventPaths;
|
|
87
|
+
exports.getGcd = require_get_gcd.getGcd;
|
|
88
|
+
exports.getGravatarUrl = require_get_gravatar_url.getGravatarUrl;
|
|
89
|
+
exports.getOrientation = require_get_orientation.getOrientation;
|
|
90
|
+
exports.getParentList = require_get_parent_list.getParentList;
|
|
91
|
+
exports.getQueryParams = require_get_query_params.getQueryParams;
|
|
92
|
+
exports.getRandomInt = require_get_random_int.getRandomInt;
|
|
93
|
+
exports.getRelativeTime = require_get_relative_time.getRelativeTime;
|
|
94
|
+
exports.getRem = require_get_rem.getRem;
|
|
95
|
+
exports.getRenderedLineHeight = require_get_rendered_line_height.getRenderedLineHeight;
|
|
96
|
+
exports.getScrollbarWidth = require_get_scrollbar_width.getScrollbarWidth;
|
|
97
|
+
exports.getSessionStorage = require_get_session_storage.getSessionStorage;
|
|
98
|
+
exports.getStringLength = require_get_string_length.getStringLength;
|
|
99
|
+
exports.getStylePropertyValue = require_get_style_property_value.getStylePropertyValue;
|
|
100
|
+
exports.getStylePropertyValueToNumber = require_get_style_property_value_to_number.getStylePropertyValueToNumber;
|
|
101
|
+
exports.getUaData = require_get_ua_data.getUaData;
|
|
102
|
+
exports.hexToRgb = require_hex_to_rgb.hexToRgb;
|
|
103
|
+
exports.htmlSanitize = require_html_sanitize.htmlSanitize;
|
|
104
|
+
exports.isAfterDateTime = require_is_after_date_time.isAfterDateTime;
|
|
105
|
+
exports.isBetweenDateTime = require_is_between_date_time.isBetweenDateTime;
|
|
106
|
+
exports.isExistAllElements = require_is_exist_all_elements.isExistAllElements;
|
|
107
|
+
exports.isInViewport = require_is_in_viewport.isInViewport;
|
|
108
|
+
exports.isIpad = require_is_ipad.isIpad;
|
|
109
|
+
exports.isKeyExists = require_is_key_exists.isKeyExists;
|
|
110
|
+
exports.isOnline = require_is_online.isOnline;
|
|
111
|
+
exports.isSafari = require_is_safari.isSafari;
|
|
112
|
+
exports.isScrollable = require_is_scrollable.isScrollable;
|
|
113
|
+
exports.isTouchSupport = require_is_touch_support.isTouchSupport;
|
|
114
|
+
exports.jsonStringToJsonObject = require_json_string_to_json_object.jsonStringToJsonObject;
|
|
115
|
+
exports.pd = require_pd.pd;
|
|
116
|
+
exports.removeAllHtmlTags = require_remove_all_html_tags.removeAllHtmlTags;
|
|
117
|
+
exports.removeAttribute = require_remove_attribute.removeAttribute;
|
|
118
|
+
exports.removeSessionStorage = require_remove_session_storage.removeSessionStorage;
|
|
119
|
+
exports.removeStylePropertyValue = require_remove_style_property_value.removeStylePropertyValue;
|
|
120
|
+
exports.rgbToHex = require_rgb_to_hex.rgbToHex;
|
|
121
|
+
exports.sanitizeHtml = require_html_sanitize.sanitizeHtml;
|
|
122
|
+
exports.scrollToHash = require_scroll_to_hash.scrollToHash;
|
|
123
|
+
exports.set100vh = require_set_100vh.set100vh;
|
|
124
|
+
exports.set100vw = require_set_100vw.set100vw;
|
|
125
|
+
exports.setAttribute = require_set_attribute.setAttribute;
|
|
126
|
+
exports.setConfig = require_set_config.setConfig;
|
|
127
|
+
exports.setScrollPositionToCenter = require_set_scroll_position_to_center.setScrollPositionToCenter;
|
|
128
|
+
exports.setSessionStorage = require_set_session_storage.setSessionStorage;
|
|
129
|
+
exports.setStylePropertyValue = require_set_style_property_value.setStylePropertyValue;
|
|
130
|
+
exports.sleep = require_sleep.sleep;
|
|
131
|
+
exports.tap = require_tap.tap;
|
|
132
|
+
exports.tapAsync = require_tap_async.tapAsync;
|
|
133
|
+
exports.throttle = require_throttle.throttle;
|
|
134
|
+
exports.toBoolean = require_to_boolean.toBoolean;
|
|
135
|
+
exports.toPositiveNumber = require_to_positive_number.toPositiveNumber;
|
|
136
|
+
exports.videoPlayControl = require_video_play_control.videoPlayControl;
|
|
137
|
+
exports.waitForAllMediaLoaded = require_wait_for_all_media_loaded.waitForAllMediaLoaded;
|
|
138
|
+
exports.wrapTextWithSpans = require_wrap_text_with_spans.wrapTextWithSpans;
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.14.0
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
1
12
|
import { tap } from "./libs/callback/tap.es.js";
|
|
2
13
|
import { tapAsync } from "./libs/callback/tap-async.es.js";
|
|
3
14
|
import { defaultConfig } from "./libs/config/default-config.es.js";
|
|
4
15
|
import { getConfig, getConfigValue } from "./libs/config/get-config.es.js";
|
|
5
16
|
import { setConfig } from "./libs/config/set-config.es.js";
|
|
17
|
+
import { getScrollbarWidth } from "./libs/get/get-scrollbar-width.es.js";
|
|
6
18
|
import { bgScrollStop } from "./libs/control/bg-scroll-stop.es.js";
|
|
7
19
|
import { copyToClipboard } from "./libs/control/copy-to-clipboard.es.js";
|
|
8
20
|
import { pd } from "./libs/control/pd.es.js";
|
|
9
21
|
import { scrollToHash } from "./libs/control/scroll-to-hash.es.js";
|
|
22
|
+
import { toBoolean } from "./libs/to/to-boolean.es.js";
|
|
10
23
|
import { videoPlayControl } from "./libs/control/video-play-control.es.js";
|
|
11
24
|
import { changeDateStringToSpecificFormat } from "./libs/convert/change-date-string-to-specific-format.es.js";
|
|
12
25
|
import { hexToRgb } from "./libs/convert/hex-to-rgb.es.js";
|
|
@@ -14,11 +27,12 @@ import { jsonStringToJsonObject } from "./libs/convert/json-string-to-json-objec
|
|
|
14
27
|
import { rgbToHex } from "./libs/convert/rgb-to-hex.es.js";
|
|
15
28
|
import { debounce } from "./libs/eventControl/debounce.es.js";
|
|
16
29
|
import { throttle } from "./libs/eventControl/throttle.es.js";
|
|
30
|
+
import { toPositiveNumber } from "./libs/to/to-positive-number.es.js";
|
|
31
|
+
import { getGcd } from "./libs/get/get-gcd.es.js";
|
|
17
32
|
import { getAspectRatio } from "./libs/get/get-aspect-ratio.es.js";
|
|
18
33
|
import { getClassNames } from "./libs/get/get-class-names.es.js";
|
|
19
34
|
import { getDocumentHeight } from "./libs/get/get-document-height.es.js";
|
|
20
35
|
import { getEventPaths } from "./libs/get/get-event-paths.es.js";
|
|
21
|
-
import { getGcd } from "./libs/get/get-gcd.es.js";
|
|
22
36
|
import { getGravatarUrl } from "./libs/get/get-gravatar-url.es.js";
|
|
23
37
|
import { getOrientation } from "./libs/get/get-orientation.es.js";
|
|
24
38
|
import { getParentList } from "./libs/get/get-parent-list.es.js";
|
|
@@ -27,11 +41,11 @@ import { getRandomInt } from "./libs/get/get-random-int.es.js";
|
|
|
27
41
|
import { getRelativeTime } from "./libs/get/get-relative-time.es.js";
|
|
28
42
|
import { getRem } from "./libs/get/get-rem.es.js";
|
|
29
43
|
import { getRenderedLineHeight } from "./libs/get/get-rendered-line-height.es.js";
|
|
30
|
-
import { getScrollbarWidth } from "./libs/get/get-scrollbar-width.es.js";
|
|
31
44
|
import { getSessionStorage } from "./libs/get/get-session-storage.es.js";
|
|
32
45
|
import { getStringLength } from "./libs/get/get-string-length.es.js";
|
|
33
46
|
import { getStylePropertyValue } from "./libs/get/get-style-property-value.es.js";
|
|
34
47
|
import { getStylePropertyValueToNumber } from "./libs/get/get-style-property-value-to-number.es.js";
|
|
48
|
+
import { isTouchSupport } from "./libs/is/is-touch-support.es.js";
|
|
35
49
|
import { getUaData } from "./libs/get/get-ua-data.es.js";
|
|
36
50
|
import { checkDeviceSize } from "./libs/is/check-device-size.es.js";
|
|
37
51
|
import { isAfterDateTime } from "./libs/is/is-after-date-time.es.js";
|
|
@@ -43,7 +57,6 @@ import { isKeyExists } from "./libs/is/is-key-exists.es.js";
|
|
|
43
57
|
import { isOnline } from "./libs/is/is-online.es.js";
|
|
44
58
|
import { isSafari } from "./libs/is/is-safari.es.js";
|
|
45
59
|
import { isScrollable } from "./libs/is/is-scrollable.es.js";
|
|
46
|
-
import { isTouchSupport } from "./libs/is/is-touch-support.es.js";
|
|
47
60
|
import { removeAllHtmlTags } from "./libs/remove/remove-all-html-tags.es.js";
|
|
48
61
|
import { removeAttribute } from "./libs/remove/remove-attribute.es.js";
|
|
49
62
|
import { removeSessionStorage } from "./libs/remove/remove-session-storage.es.js";
|
|
@@ -55,74 +68,7 @@ import { setAttribute } from "./libs/set/set-attribute.es.js";
|
|
|
55
68
|
import { setScrollPositionToCenter } from "./libs/set/set-scroll-position-to-center.es.js";
|
|
56
69
|
import { setSessionStorage } from "./libs/set/set-session-storage.es.js";
|
|
57
70
|
import { setStylePropertyValue } from "./libs/set/set-style-property-value.es.js";
|
|
58
|
-
import { toBoolean } from "./libs/to/to-boolean.es.js";
|
|
59
|
-
import { toPositiveNumber } from "./libs/to/to-positive-number.es.js";
|
|
60
71
|
import { wrapTextWithSpans } from "./libs/transform/wrap-text-with-spans.es.js";
|
|
61
72
|
import { sleep } from "./libs/wait/sleep.es.js";
|
|
62
73
|
import { waitForAllMediaLoaded } from "./libs/wait/wait-for-all-media-loaded.es.js";
|
|
63
|
-
export {
|
|
64
|
-
bgScrollStop,
|
|
65
|
-
changeDateStringToSpecificFormat,
|
|
66
|
-
checkDeviceSize,
|
|
67
|
-
copyToClipboard,
|
|
68
|
-
debounce,
|
|
69
|
-
defaultConfig,
|
|
70
|
-
getAspectRatio,
|
|
71
|
-
getClassNames,
|
|
72
|
-
getConfig,
|
|
73
|
-
getConfigValue,
|
|
74
|
-
getDocumentHeight,
|
|
75
|
-
getEventPaths,
|
|
76
|
-
getGcd,
|
|
77
|
-
getGravatarUrl,
|
|
78
|
-
getOrientation,
|
|
79
|
-
getParentList,
|
|
80
|
-
getQueryParams,
|
|
81
|
-
getRandomInt,
|
|
82
|
-
getRelativeTime,
|
|
83
|
-
getRem,
|
|
84
|
-
getRenderedLineHeight,
|
|
85
|
-
getScrollbarWidth,
|
|
86
|
-
getSessionStorage,
|
|
87
|
-
getStringLength,
|
|
88
|
-
getStylePropertyValue,
|
|
89
|
-
getStylePropertyValueToNumber,
|
|
90
|
-
getUaData,
|
|
91
|
-
hexToRgb,
|
|
92
|
-
htmlSanitize,
|
|
93
|
-
isAfterDateTime,
|
|
94
|
-
isBetweenDateTime,
|
|
95
|
-
isExistAllElements,
|
|
96
|
-
isInViewport,
|
|
97
|
-
isIpad,
|
|
98
|
-
isKeyExists,
|
|
99
|
-
isOnline,
|
|
100
|
-
isSafari,
|
|
101
|
-
isScrollable,
|
|
102
|
-
isTouchSupport,
|
|
103
|
-
jsonStringToJsonObject,
|
|
104
|
-
pd,
|
|
105
|
-
removeAllHtmlTags,
|
|
106
|
-
removeAttribute,
|
|
107
|
-
removeSessionStorage,
|
|
108
|
-
removeStylePropertyValue,
|
|
109
|
-
rgbToHex,
|
|
110
|
-
sanitizeHtml,
|
|
111
|
-
scrollToHash,
|
|
112
|
-
set100vh,
|
|
113
|
-
set100vw,
|
|
114
|
-
setAttribute,
|
|
115
|
-
setConfig,
|
|
116
|
-
setScrollPositionToCenter,
|
|
117
|
-
setSessionStorage,
|
|
118
|
-
setStylePropertyValue,
|
|
119
|
-
sleep,
|
|
120
|
-
tap,
|
|
121
|
-
tapAsync,
|
|
122
|
-
throttle,
|
|
123
|
-
toBoolean,
|
|
124
|
-
toPositiveNumber,
|
|
125
|
-
videoPlayControl,
|
|
126
|
-
waitForAllMediaLoaded,
|
|
127
|
-
wrapTextWithSpans
|
|
128
|
-
};
|
|
74
|
+
export { bgScrollStop, changeDateStringToSpecificFormat, checkDeviceSize, copyToClipboard, debounce, defaultConfig, getAspectRatio, getClassNames, getConfig, getConfigValue, getDocumentHeight, getEventPaths, getGcd, getGravatarUrl, getOrientation, getParentList, getQueryParams, getRandomInt, getRelativeTime, getRem, getRenderedLineHeight, getScrollbarWidth, getSessionStorage, getStringLength, getStylePropertyValue, getStylePropertyValueToNumber, getUaData, hexToRgb, htmlSanitize, isAfterDateTime, isBetweenDateTime, isExistAllElements, isInViewport, isIpad, isKeyExists, isOnline, isSafari, isScrollable, isTouchSupport, jsonStringToJsonObject, pd, removeAllHtmlTags, removeAttribute, removeSessionStorage, removeStylePropertyValue, rgbToHex, sanitizeHtml, scrollToHash, set100vh, set100vw, setAttribute, setConfig, setScrollPositionToCenter, setSessionStorage, setStylePropertyValue, sleep, tap, tapAsync, throttle, toBoolean, toPositiveNumber, videoPlayControl, waitForAllMediaLoaded, wrapTextWithSpans };
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.14.0
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
exports.tap =
|
|
6
|
-
exports.tapAsync =
|
|
13
|
+
const require_tap = require("./tap.cjs");
|
|
14
|
+
const require_tap_async = require("./tap-async.cjs");
|
|
15
|
+
exports.tap = require_tap.tap;
|
|
16
|
+
exports.tapAsync = require_tap_async.tapAsync;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.14.0
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
1
12
|
import { tap } from "./tap.es.js";
|
|
2
13
|
import { tapAsync } from "./tap-async.es.js";
|
|
3
|
-
export {
|
|
4
|
-
tap,
|
|
5
|
-
tapAsync
|
|
6
|
-
};
|
|
14
|
+
export { tap, tapAsync };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return value;
|
|
1
|
+
// src/libs/callback/tap-async.ts
|
|
2
|
+
var tapAsync = async (promise, callback) => {
|
|
3
|
+
const value = await promise;
|
|
4
|
+
callback(value);
|
|
5
|
+
return value;
|
|
7
6
|
};
|
|
8
7
|
exports.tapAsync = tapAsync;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
tapAsync
|
|
1
|
+
// src/libs/callback/tap-async.ts
|
|
2
|
+
var tapAsync = async (promise, callback) => {
|
|
3
|
+
const value = await promise;
|
|
4
|
+
callback(value);
|
|
5
|
+
return value;
|
|
8
6
|
};
|
|
7
|
+
export { tapAsync };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return value;
|
|
1
|
+
// src/libs/callback/tap.ts
|
|
2
|
+
var tap = (value, callback) => {
|
|
3
|
+
callback(value);
|
|
4
|
+
return value;
|
|
6
5
|
};
|
|
7
6
|
exports.tap = tap;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const defaultConfig = require("./default-config.cjs");
|
|
4
|
-
const currentConfig = { ...defaultConfig.defaultConfig };
|
|
1
|
+
// src/libs/config/_internal.ts
|
|
2
|
+
var currentConfig = { ...require("./default-config.cjs").defaultConfig };
|
|
5
3
|
exports.currentConfig = currentConfig;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return { ..._internal.currentConfig };
|
|
1
|
+
const require__internal = require("./_internal.cjs");
|
|
2
|
+
// src/libs/config/get-config.ts
|
|
3
|
+
var getConfig = () => {
|
|
4
|
+
return { ...require__internal.currentConfig };
|
|
6
5
|
};
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var getConfigValue = (key) => {
|
|
7
|
+
return require__internal.currentConfig[key];
|
|
9
8
|
};
|
|
10
9
|
exports.getConfig = getConfig;
|
|
11
10
|
exports.getConfigValue = getConfigValue;
|