umaki 0.2.3 → 0.2.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.
Files changed (96) hide show
  1. package/dist/LICENSE.txt +32 -0
  2. package/dist/_virtual/_commonjsHelpers.cjs.js +19 -1
  3. package/dist/_virtual/_commonjsHelpers.es.js +16 -5
  4. package/dist/_virtual/isBetween.cjs.js +15 -1
  5. package/dist/_virtual/isBetween.es.js +13 -2
  6. package/dist/index.cjs.js +99 -1
  7. package/dist/index.es.js +97 -86
  8. package/dist/libs/control/bgScrollStop.cjs.js +24 -1
  9. package/dist/libs/control/bgScrollStop.es.js +21 -4
  10. package/dist/libs/control/pd.cjs.js +15 -1
  11. package/dist/libs/control/pd.es.js +13 -2
  12. package/dist/libs/control/scrollToHash.cjs.js +47 -1
  13. package/dist/libs/control/scrollToHash.es.js +42 -16
  14. package/dist/libs/control/videoPlayControl.cjs.js +33 -1
  15. package/dist/libs/control/videoPlayControl.es.js +26 -12
  16. package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +16 -1
  17. package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +14 -3
  18. package/dist/libs/convert/jsonStringToJsonObject.cjs.js +20 -1
  19. package/dist/libs/convert/jsonStringToJsonObject.es.js +15 -4
  20. package/dist/libs/get/getAspectRatio.cjs.js +19 -1
  21. package/dist/libs/get/getAspectRatio.es.js +16 -5
  22. package/dist/libs/get/getClassNames.cjs.js +18 -1
  23. package/dist/libs/get/getClassNames.es.js +16 -2
  24. package/dist/libs/get/getDocumentHeight.cjs.js +15 -1
  25. package/dist/libs/get/getDocumentHeight.es.js +13 -2
  26. package/dist/libs/get/getEventPaths.cjs.js +35 -1
  27. package/dist/libs/get/getEventPaths.es.js +30 -12
  28. package/dist/libs/get/getGcd.cjs.js +21 -1
  29. package/dist/libs/get/getGcd.es.js +18 -5
  30. package/dist/libs/get/getOrientation.cjs.js +18 -1
  31. package/dist/libs/get/getOrientation.es.js +16 -2
  32. package/dist/libs/get/getParentList.cjs.js +19 -1
  33. package/dist/libs/get/getParentList.es.js +16 -4
  34. package/dist/libs/get/getQueryParams.cjs.js +30 -1
  35. package/dist/libs/get/getQueryParams.es.js +26 -12
  36. package/dist/libs/get/getRem.cjs.js +18 -1
  37. package/dist/libs/get/getRem.es.js +16 -2
  38. package/dist/libs/get/getScrollbarWidth.cjs.js +15 -1
  39. package/dist/libs/get/getScrollbarWidth.es.js +13 -2
  40. package/dist/libs/get/getSessionStorage.cjs.js +20 -1
  41. package/dist/libs/get/getSessionStorage.es.js +17 -5
  42. package/dist/libs/get/getStringLength.cjs.js +16 -1
  43. package/dist/libs/get/getStringLength.es.js +14 -3
  44. package/dist/libs/get/getStylePropertyValue.cjs.js +15 -1
  45. package/dist/libs/get/getStylePropertyValue.es.js +13 -2
  46. package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +16 -1
  47. package/dist/libs/get/getStylePropertyValueToNumber.es.js +14 -3
  48. package/dist/libs/get/getUaData.cjs.js +34 -1
  49. package/dist/libs/get/getUaData.es.js +30 -12
  50. package/dist/libs/is/isBetweenDateTime.cjs.js +25 -1
  51. package/dist/libs/is/isBetweenDateTime.es.js +21 -8
  52. package/dist/libs/is/isExistAllElements.cjs.js +17 -1
  53. package/dist/libs/is/isExistAllElements.es.js +15 -2
  54. package/dist/libs/is/isIpad.cjs.js +21 -1
  55. package/dist/libs/is/isIpad.es.js +18 -6
  56. package/dist/libs/is/isKeyExists.cjs.js +17 -1
  57. package/dist/libs/is/isKeyExists.es.js +15 -2
  58. package/dist/libs/is/isSafari.cjs.js +22 -1
  59. package/dist/libs/is/isSafari.es.js +19 -5
  60. package/dist/libs/is/isScrollable.cjs.js +19 -1
  61. package/dist/libs/is/isScrollable.es.js +16 -4
  62. package/dist/libs/is/isTouchSupport.cjs.js +16 -1
  63. package/dist/libs/is/isTouchSupport.es.js +14 -3
  64. package/dist/libs/remove/removeAllHtmlTags.cjs.js +23 -1
  65. package/dist/libs/remove/removeAllHtmlTags.es.js +21 -7
  66. package/dist/libs/remove/removeAttribute.cjs.js +17 -1
  67. package/dist/libs/remove/removeAttribute.es.js +14 -3
  68. package/dist/libs/remove/removeSessionStorage.cjs.js +18 -1
  69. package/dist/libs/remove/removeSessionStorage.es.js +15 -4
  70. package/dist/libs/remove/removeStylePropertyValue.cjs.js +17 -1
  71. package/dist/libs/remove/removeStylePropertyValue.es.js +14 -3
  72. package/dist/libs/set/set100vh.cjs.js +18 -1
  73. package/dist/libs/set/set100vh.es.js +15 -4
  74. package/dist/libs/set/set100vw.cjs.js +18 -1
  75. package/dist/libs/set/set100vw.es.js +15 -4
  76. package/dist/libs/set/setAttribute.cjs.js +17 -1
  77. package/dist/libs/set/setAttribute.es.js +14 -3
  78. package/dist/libs/set/setScrollPositionToCenter.cjs.js +21 -1
  79. package/dist/libs/set/setScrollPositionToCenter.es.js +18 -4
  80. package/dist/libs/set/setSessionStorage.cjs.js +18 -1
  81. package/dist/libs/set/setSessionStorage.es.js +15 -4
  82. package/dist/libs/set/setStylePropertyValue.cjs.js +17 -1
  83. package/dist/libs/set/setStylePropertyValue.es.js +14 -3
  84. package/dist/libs/to/toBoolean.cjs.js +17 -1
  85. package/dist/libs/to/toBoolean.es.js +15 -2
  86. package/dist/libs/to/toPositiveNumber.cjs.js +15 -1
  87. package/dist/libs/to/toPositiveNumber.es.js +13 -2
  88. package/dist/libs/transform/wrapTextWithSpans.cjs.js +31 -1
  89. package/dist/libs/transform/wrapTextWithSpans.es.js +27 -13
  90. package/dist/libs/wait/sleep.cjs.js +17 -1
  91. package/dist/libs/wait/sleep.es.js +15 -2
  92. package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +55 -1
  93. package/dist/libs/wait/waitForAllMediaLoaded.es.js +47 -20
  94. package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +30 -1
  95. package/dist/node_modules/dayjs/plugin/isBetween.es.js +25 -14
  96. package/package.json +2 -1
@@ -1,9 +1,23 @@
1
- import e from "isomorphic-dompurify";
2
- const n = (t) => e.sanitize(t, {
3
- ALLOWED_TAGS: [],
4
- KEEP_CONTENT: !0,
5
- USE_PROFILES: { html: !1 }
6
- }).replace(/<\/?[^>]+(>|$)/g, "");
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ import DOMPurify from "isomorphic-dompurify";
13
+ const removeAllHtmlTags = (string) => {
14
+ const sanitizeString = DOMPurify.sanitize(string, {
15
+ ALLOWED_TAGS: [],
16
+ KEEP_CONTENT: true,
17
+ USE_PROFILES: { html: false }
18
+ });
19
+ return sanitizeString.replace(/<\/?[^>]+(>|$)/g, "");
20
+ };
7
21
  export {
8
- n as removeAllHtmlTags
22
+ removeAllHtmlTags
9
23
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=(e,t)=>{e.removeAttribute(t)};exports.removeAttribute=r;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const removeAttribute = (element, attribute) => {
15
+ element.removeAttribute(attribute);
16
+ };
17
+ exports.removeAttribute = removeAttribute;
@@ -1,6 +1,17 @@
1
- const r = (t, e) => {
2
- t.removeAttribute(e);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const removeAttribute = (element, attribute) => {
13
+ element.removeAttribute(attribute);
3
14
  };
4
15
  export {
5
- r as removeAttribute
16
+ removeAttribute
6
17
  };
@@ -1 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("store2"),r=e=>{o.session.remove(e)};exports.removeSessionStorage=r;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const store = require("store2");
15
+ const removeSessionStorage = (key) => {
16
+ store.session.remove(key);
17
+ };
18
+ exports.removeSessionStorage = removeSessionStorage;
@@ -1,7 +1,18 @@
1
- import e from "store2";
2
- const s = (o) => {
3
- e.session.remove(o);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ import store from "store2";
13
+ const removeSessionStorage = (key) => {
14
+ store.session.remove(key);
4
15
  };
5
16
  export {
6
- s as removeSessionStorage
17
+ removeSessionStorage
7
18
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>{document.documentElement.style.removeProperty(e)};exports.removeStylePropertyValue=t;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const removeStylePropertyValue = (key) => {
15
+ document.documentElement.style.removeProperty(key);
16
+ };
17
+ exports.removeStylePropertyValue = removeStylePropertyValue;
@@ -1,6 +1,17 @@
1
- const t = (e) => {
2
- document.documentElement.style.removeProperty(e);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const removeStylePropertyValue = (key) => {
13
+ document.documentElement.style.removeProperty(key);
3
14
  };
4
15
  export {
5
- t as removeStylePropertyValue
16
+ removeStylePropertyValue
6
17
  };
@@ -1 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=(e="--vh")=>{const t=window.innerHeight*.01;document.documentElement.style.setProperty(e,`${t}px`)};exports.set100vh=n;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const set100vh = (setProperty = "--vh") => {
15
+ const vh = window.innerHeight * 0.01;
16
+ document.documentElement.style.setProperty(setProperty, `${vh}px`);
17
+ };
18
+ exports.set100vh = set100vh;
@@ -1,7 +1,18 @@
1
- const n = (e = "--vh") => {
2
- const t = window.innerHeight * 0.01;
3
- document.documentElement.style.setProperty(e, `${t}px`);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const set100vh = (setProperty = "--vh") => {
13
+ const vh = window.innerHeight * 0.01;
14
+ document.documentElement.style.setProperty(setProperty, `${vh}px`);
4
15
  };
5
16
  export {
6
- n as set100vh
17
+ set100vh
7
18
  };
@@ -1 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=(e="--vw")=>{const t=document.documentElement.clientWidth;document.documentElement.style.setProperty(e,`${t}px`)};exports.set100vw=n;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const set100vw = (setProperty = "--vw") => {
15
+ const vw = document.documentElement.clientWidth;
16
+ document.documentElement.style.setProperty(setProperty, `${vw}px`);
17
+ };
18
+ exports.set100vw = set100vw;
@@ -1,7 +1,18 @@
1
- const n = (t = "--vw") => {
2
- const e = document.documentElement.clientWidth;
3
- document.documentElement.style.setProperty(t, `${e}px`);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const set100vw = (setProperty = "--vw") => {
13
+ const vw = document.documentElement.clientWidth;
14
+ document.documentElement.style.setProperty(setProperty, `${vw}px`);
4
15
  };
5
16
  export {
6
- n as set100vw
17
+ set100vw
7
18
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(t,e,r)=>{t.setAttribute(e,r)};exports.setAttribute=i;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const setAttribute = (element, attribute, value) => {
15
+ element.setAttribute(attribute, value);
16
+ };
17
+ exports.setAttribute = setAttribute;
@@ -1,6 +1,17 @@
1
- const s = (t, e, r) => {
2
- t.setAttribute(e, r);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const setAttribute = (element, attribute, value) => {
13
+ element.setAttribute(attribute, value);
3
14
  };
4
15
  export {
5
- s as setAttribute
16
+ setAttribute
6
17
  };
@@ -1 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(t,o,e="smooth")=>{const n=t.getBoundingClientRect().width/2,s=o.getBoundingClientRect().width/2,c=o.offsetLeft+s-n;t.scrollTo({left:c,behavior:e})};exports.setScrollPositionToCenter=i;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
15
+ const rootHalfW = rootElement.getBoundingClientRect().width / 2;
16
+ const buttonHalfW = targetElement.getBoundingClientRect().width / 2;
17
+ const currentPosLeft = targetElement.offsetLeft + buttonHalfW;
18
+ const posLeft = currentPosLeft - rootHalfW;
19
+ rootElement.scrollTo({ left: posLeft, behavior });
20
+ };
21
+ exports.setScrollPositionToCenter = setScrollPositionToCenter;
@@ -1,7 +1,21 @@
1
- const i = (t, o, n = "smooth") => {
2
- const e = t.getBoundingClientRect().width / 2, s = o.getBoundingClientRect().width / 2, c = o.offsetLeft + s - e;
3
- t.scrollTo({ left: c, behavior: n });
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
13
+ const rootHalfW = rootElement.getBoundingClientRect().width / 2;
14
+ const buttonHalfW = targetElement.getBoundingClientRect().width / 2;
15
+ const currentPosLeft = targetElement.offsetLeft + buttonHalfW;
16
+ const posLeft = currentPosLeft - rootHalfW;
17
+ rootElement.scrollTo({ left: posLeft, behavior });
4
18
  };
5
19
  export {
6
- i as setScrollPositionToCenter
20
+ setScrollPositionToCenter
7
21
  };
@@ -1 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("store2"),o=(e,s)=>{t.session.set(e,s)};exports.setSessionStorage=o;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const store = require("store2");
15
+ const setSessionStorage = (key, value) => {
16
+ store.session.set(key, value);
17
+ };
18
+ exports.setSessionStorage = setSessionStorage;
@@ -1,7 +1,18 @@
1
- import e from "store2";
2
- const r = (s, o) => {
3
- e.session.set(s, o);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ import store from "store2";
13
+ const setSessionStorage = (key, value) => {
14
+ store.session.set(key, value);
4
15
  };
5
16
  export {
6
- r as setSessionStorage
17
+ setSessionStorage
7
18
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(e,t)=>{document.documentElement.style.setProperty(e,t)};exports.setStylePropertyValue=o;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const setStylePropertyValue = (key, value) => {
15
+ document.documentElement.style.setProperty(key, value);
16
+ };
17
+ exports.setStylePropertyValue = setStylePropertyValue;
@@ -1,6 +1,17 @@
1
- const o = (e, t) => {
2
- document.documentElement.style.setProperty(e, t);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const setStylePropertyValue = (key, value) => {
13
+ document.documentElement.style.setProperty(key, value);
3
14
  };
4
15
  export {
5
- o as setStylePropertyValue
16
+ setStylePropertyValue
6
17
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>e?e.toLowerCase()==="true":!1;exports.toBoolean=o;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const toBoolean = (booleanStr) => {
15
+ return booleanStr ? booleanStr.toLowerCase() === "true" : false;
16
+ };
17
+ exports.toBoolean = toBoolean;
@@ -1,4 +1,17 @@
1
- const o = (e) => e ? e.toLowerCase() === "true" : !1;
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const toBoolean = (booleanStr) => {
13
+ return booleanStr ? booleanStr.toLowerCase() === "true" : false;
14
+ };
2
15
  export {
3
- o as toBoolean
16
+ toBoolean
4
17
  };
@@ -1 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>Math.abs(t);exports.toPositiveNumber=e;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const toPositiveNumber = (n) => Math.abs(n);
15
+ exports.toPositiveNumber = toPositiveNumber;
@@ -1,4 +1,15 @@
1
- const o = (t) => Math.abs(t);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const toPositiveNumber = (n) => Math.abs(n);
2
13
  export {
3
- o as toPositiveNumber
14
+ toPositiveNumber
4
15
  };
@@ -1 +1,31 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=t=>{if(t){if(t.nodeType===Node.TEXT_NODE){const o=(t.textContent||"").trim(),e=document.createDocumentFragment();for(const c of o){const n=document.createElement("span");n.textContent=c,e.appendChild(n)}t.replaceWith(e)}else if(t.nodeType===Node.ELEMENT_NODE)for(const o of Array.from(t.childNodes))r(o)}};exports.wrapTextWithSpans=r;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const wrapTextWithSpans = (element) => {
15
+ if (!element) return;
16
+ if (element.nodeType === Node.TEXT_NODE) {
17
+ const textContent = (element.textContent || "").trim();
18
+ const fragment = document.createDocumentFragment();
19
+ for (const char of textContent) {
20
+ const span = document.createElement("span");
21
+ span.textContent = char;
22
+ fragment.appendChild(span);
23
+ }
24
+ element.replaceWith(fragment);
25
+ } else if (element.nodeType === Node.ELEMENT_NODE) {
26
+ for (const child of Array.from(element.childNodes)) {
27
+ wrapTextWithSpans(child);
28
+ }
29
+ }
30
+ };
31
+ exports.wrapTextWithSpans = wrapTextWithSpans;
@@ -1,17 +1,31 @@
1
- const c = (t) => {
2
- if (t) {
3
- if (t.nodeType === Node.TEXT_NODE) {
4
- const o = (t.textContent || "").trim(), n = document.createDocumentFragment();
5
- for (const r of o) {
6
- const e = document.createElement("span");
7
- e.textContent = r, n.appendChild(e);
8
- }
9
- t.replaceWith(n);
10
- } else if (t.nodeType === Node.ELEMENT_NODE)
11
- for (const o of Array.from(t.childNodes))
12
- c(o);
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const wrapTextWithSpans = (element) => {
13
+ if (!element) return;
14
+ if (element.nodeType === Node.TEXT_NODE) {
15
+ const textContent = (element.textContent || "").trim();
16
+ const fragment = document.createDocumentFragment();
17
+ for (const char of textContent) {
18
+ const span = document.createElement("span");
19
+ span.textContent = char;
20
+ fragment.appendChild(span);
21
+ }
22
+ element.replaceWith(fragment);
23
+ } else if (element.nodeType === Node.ELEMENT_NODE) {
24
+ for (const child of Array.from(element.childNodes)) {
25
+ wrapTextWithSpans(child);
26
+ }
13
27
  }
14
28
  };
15
29
  export {
16
- c as wrapTextWithSpans
30
+ wrapTextWithSpans
17
31
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>new Promise(t=>setTimeout(t,e*1e3,"foo"));exports.sleep=o;
1
+ "use strict";
2
+ /*!
3
+ * name: umaki
4
+ * version: v0.2.5
5
+ * description: A utility that is often used in web production.
6
+ * author: TsubasaHiga
7
+ * homepage: https://github.com/TsubasaHiga/umaki
8
+ * Released under the MIT License
9
+ *
10
+ * This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
11
+ * For license information, please see LICENSE.txt
12
+ */
13
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
+ const sleep = (time) => {
15
+ return new Promise((resolve) => setTimeout(resolve, time * 1e3, "foo"));
16
+ };
17
+ exports.sleep = sleep;
@@ -1,4 +1,17 @@
1
- const t = (e) => new Promise((o) => setTimeout(o, e * 1e3, "foo"));
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.2.5
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
+ */
12
+ const sleep = (time) => {
13
+ return new Promise((resolve) => setTimeout(resolve, time * 1e3, "foo"));
14
+ };
2
15
  export {
3
- t as sleep
16
+ sleep
4
17
  };