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,4 +1,15 @@
1
- const t = () => window.innerWidth - document.body.clientWidth;
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 getScrollbarWidth = () => window.innerWidth - document.body.clientWidth;
2
13
  export {
3
- t as getScrollbarWidth
14
+ getScrollbarWidth
4
15
  };
@@ -1 +1,20 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("store2"),r=t=>{const e=o.session.get(t);return e===void 0?null:e};exports.getSessionStorage=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 getSessionStorage = (key) => {
16
+ const value = store.session.get(key);
17
+ if (value === void 0) return null;
18
+ return value;
19
+ };
20
+ exports.getSessionStorage = getSessionStorage;
@@ -1,8 +1,20 @@
1
- import t from "store2";
2
- const s = (o) => {
3
- const e = t.session.get(o);
4
- return e === void 0 ? null : 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
+ import store from "store2";
13
+ const getSessionStorage = (key) => {
14
+ const value = store.session.get(key);
15
+ if (value === void 0) return null;
16
+ return value;
5
17
  };
6
18
  export {
7
- s as getSessionStorage
19
+ getSessionStorage
8
20
  };
@@ -1 +1,16 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("runes2"),n=e=>t.runes(e).length;exports.getStringLength=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 runes2 = require("runes2");
15
+ const getStringLength = (str) => runes2.runes(str).length;
16
+ exports.getStringLength = getStringLength;
@@ -1,5 +1,16 @@
1
- import { runes as e } from "runes2";
2
- const r = (t) => e(t).length;
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 { runes } from "runes2";
13
+ const getStringLength = (str) => runes(str).length;
3
14
  export {
4
- r as getStringLength
15
+ getStringLength
5
16
  };
@@ -1 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>getComputedStyle(document.documentElement).getPropertyValue(e);exports.getStylePropertyValue=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 getStylePropertyValue = (key) => getComputedStyle(document.documentElement).getPropertyValue(key);
15
+ exports.getStylePropertyValue = getStylePropertyValue;
@@ -1,4 +1,15 @@
1
- const t = (e) => getComputedStyle(document.documentElement).getPropertyValue(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 getStylePropertyValue = (key) => getComputedStyle(document.documentElement).getPropertyValue(key);
2
13
  export {
3
- t as getStylePropertyValue
14
+ getStylePropertyValue
4
15
  };
@@ -1 +1,16 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./getStylePropertyValue.cjs.js"),r=e=>Number.parseInt(t.getStylePropertyValue(e))||0;exports.getStylePropertyValueToNumber=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 getStylePropertyValue = require("./getStylePropertyValue.cjs.js");
15
+ const getStylePropertyValueToNumber = (key) => Number.parseInt(getStylePropertyValue.getStylePropertyValue(key)) || 0;
16
+ exports.getStylePropertyValueToNumber = getStylePropertyValueToNumber;
@@ -1,5 +1,16 @@
1
- import { getStylePropertyValue as r } from "./getStylePropertyValue.es.js";
2
- const o = (e) => Number.parseInt(r(e)) || 0;
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 { getStylePropertyValue } from "./getStylePropertyValue.es.js";
13
+ const getStylePropertyValueToNumber = (key) => Number.parseInt(getStylePropertyValue(key)) || 0;
3
14
  export {
4
- o as getStylePropertyValueToNumber
15
+ getStylePropertyValueToNumber
5
16
  };
@@ -1 +1,34 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("ua-parser-js"),c=require("../is/isTouchSupport.cjs.js"),p=()=>{const e=new a().getResult(),r=e.browser.name,o=e.browser.version,t=e.engine.name,s=e.os.name,n=e.device.type;return{browserName:r?r.toLowerCase().replace(" ","-"):"",browserVersion:o||"",browserEngine:t?t.toLowerCase().replace(" ","-"):"",osName:s?s.toLowerCase().replace(" ","-"):"",type:typeof n<"u"?n.toLowerCase().replace(" ","-"):"laptop",touchSupport:c.isTouchSupport()}};exports.getUaData=p;
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 UAParser = require("ua-parser-js");
15
+ const isTouchSupport = require("../is/isTouchSupport.cjs.js");
16
+ const getUaData = () => {
17
+ const parser = new UAParser();
18
+ const result = parser.getResult();
19
+ const browserName = result.browser.name;
20
+ const browserVersion = result.browser.version;
21
+ const browserEngine = result.engine.name;
22
+ const osName = result.os.name;
23
+ const type = result.device.type;
24
+ const uaString = {
25
+ browserName: browserName ? browserName.toLowerCase().replace(" ", "-") : "",
26
+ browserVersion: browserVersion ? browserVersion : "",
27
+ browserEngine: browserEngine ? browserEngine.toLowerCase().replace(" ", "-") : "",
28
+ osName: osName ? osName.toLowerCase().replace(" ", "-") : "",
29
+ type: typeof type !== "undefined" ? type.toLowerCase().replace(" ", "-") : "laptop",
30
+ touchSupport: isTouchSupport.isTouchSupport()
31
+ };
32
+ return uaString;
33
+ };
34
+ exports.getUaData = getUaData;
@@ -1,16 +1,34 @@
1
- import a from "ua-parser-js";
2
- import { isTouchSupport as p } from "../is/isTouchSupport.es.js";
3
- const u = () => {
4
- const e = new a().getResult(), r = e.browser.name, o = e.browser.version, s = e.engine.name, t = e.os.name, n = e.device.type;
5
- return {
6
- browserName: r ? r.toLowerCase().replace(" ", "-") : "",
7
- browserVersion: o || "",
8
- browserEngine: s ? s.toLowerCase().replace(" ", "-") : "",
9
- osName: t ? t.toLowerCase().replace(" ", "-") : "",
10
- type: typeof n < "u" ? n.toLowerCase().replace(" ", "-") : "laptop",
11
- touchSupport: p()
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 UAParser from "ua-parser-js";
13
+ import { isTouchSupport } from "../is/isTouchSupport.es.js";
14
+ const getUaData = () => {
15
+ const parser = new UAParser();
16
+ const result = parser.getResult();
17
+ const browserName = result.browser.name;
18
+ const browserVersion = result.browser.version;
19
+ const browserEngine = result.engine.name;
20
+ const osName = result.os.name;
21
+ const type = result.device.type;
22
+ const uaString = {
23
+ browserName: browserName ? browserName.toLowerCase().replace(" ", "-") : "",
24
+ browserVersion: browserVersion ? browserVersion : "",
25
+ browserEngine: browserEngine ? browserEngine.toLowerCase().replace(" ", "-") : "",
26
+ osName: osName ? osName.toLowerCase().replace(" ", "-") : "",
27
+ type: typeof type !== "undefined" ? type.toLowerCase().replace(" ", "-") : "laptop",
28
+ touchSupport: isTouchSupport()
12
29
  };
30
+ return uaString;
13
31
  };
14
32
  export {
15
- u as getUaData
33
+ getUaData
16
34
  };
@@ -1 +1,25 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("dayjs"),o=require("../../node_modules/dayjs/plugin/isBetween.cjs.js");e.extend(o.default);const a=(t,i,n=e())=>{if(!e(t).isValid()||!e(i).isValid())throw new Error("dateA or dateB is not valid date");const s=e(t),r=e(i);return n.isBetween(s,r,"millisecond")};exports.isBetweenDateTime=a;
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 dayjs = require("dayjs");
15
+ const isBetween = require("../../node_modules/dayjs/plugin/isBetween.cjs.js");
16
+ dayjs.extend(isBetween.default);
17
+ const isBetweenDateTime = (dateA, dateB, now = dayjs()) => {
18
+ if (!dayjs(dateA).isValid() || !dayjs(dateB).isValid()) {
19
+ throw new Error("dateA or dateB is not valid date");
20
+ }
21
+ const a = dayjs(dateA);
22
+ const b = dayjs(dateB);
23
+ return now.isBetween(a, b, "millisecond");
24
+ };
25
+ exports.isBetweenDateTime = isBetweenDateTime;
@@ -1,12 +1,25 @@
1
- import e from "dayjs";
2
- import s from "../../node_modules/dayjs/plugin/isBetween.es.js";
3
- e.extend(s);
4
- const m = (i, t, o = e()) => {
5
- if (!e(i).isValid() || !e(t).isValid())
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 dayjs from "dayjs";
13
+ import isBetween from "../../node_modules/dayjs/plugin/isBetween.es.js";
14
+ dayjs.extend(isBetween);
15
+ const isBetweenDateTime = (dateA, dateB, now = dayjs()) => {
16
+ if (!dayjs(dateA).isValid() || !dayjs(dateB).isValid()) {
6
17
  throw new Error("dateA or dateB is not valid date");
7
- const r = e(i), n = e(t);
8
- return o.isBetween(r, n, "millisecond");
18
+ }
19
+ const a = dayjs(dateA);
20
+ const b = dayjs(dateB);
21
+ return now.isBetween(a, b, "millisecond");
9
22
  };
10
23
  export {
11
- m as isBetweenDateTime
24
+ isBetweenDateTime
12
25
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=e=>e.length>0&&e.every(t=>t!==null);exports.isExistAllElements=l;
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 isExistAllElements = (elements) => {
15
+ return elements.length > 0 && elements.every((element) => element !== null);
16
+ };
17
+ exports.isExistAllElements = isExistAllElements;
@@ -1,4 +1,17 @@
1
- const e = (l) => l.length > 0 && l.every((t) => t !== null);
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 isExistAllElements = (elements) => {
13
+ return elements.length > 0 && elements.every((element) => element !== null);
14
+ };
2
15
  export {
3
- e as isExistAllElements
16
+ isExistAllElements
4
17
  };
@@ -1 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../get/getOrientation.cjs.js"),r=require("../get/getUaData.cjs.js"),o=(e="portrait")=>{const t=r.getUaData();return t.touchSupport?t.type==="laptop"&&t.osName==="mac-os"&&t.browserName==="safari"&&t.touchSupport&&a.getOrientation()===e:!1};exports.isIpad=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 getOrientation = require("../get/getOrientation.cjs.js");
15
+ const getUaData = require("../get/getUaData.cjs.js");
16
+ const isIpad = (orientation = "portrait") => {
17
+ const clientData = getUaData.getUaData();
18
+ if (!clientData.touchSupport) return false;
19
+ return clientData.type === "laptop" && clientData.osName === "mac-os" && clientData.browserName === "safari" && clientData.touchSupport && getOrientation.getOrientation() === orientation;
20
+ };
21
+ exports.isIpad = isIpad;
@@ -1,9 +1,21 @@
1
- import { getOrientation as r } from "../get/getOrientation.es.js";
2
- import { getUaData as a } from "../get/getUaData.es.js";
3
- const i = (o = "portrait") => {
4
- const t = a();
5
- return t.touchSupport ? t.type === "laptop" && t.osName === "mac-os" && t.browserName === "safari" && t.touchSupport && r() === o : !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
+ import { getOrientation } from "../get/getOrientation.es.js";
13
+ import { getUaData } from "../get/getUaData.es.js";
14
+ const isIpad = (orientation = "portrait") => {
15
+ const clientData = getUaData();
16
+ if (!clientData.touchSupport) return false;
17
+ return clientData.type === "laptop" && clientData.osName === "mac-os" && clientData.browserName === "safari" && clientData.touchSupport && getOrientation() === orientation;
6
18
  };
7
19
  export {
8
- i as isIpad
20
+ isIpad
9
21
  };
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(t,e)=>!!t&&Object.prototype.hasOwnProperty.call(t,e);exports.isKeyExists=s;
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 isKeyExists = (obj, key) => {
15
+ return !!obj && Object.prototype.hasOwnProperty.call(obj, key);
16
+ };
17
+ exports.isKeyExists = isKeyExists;
@@ -1,4 +1,17 @@
1
- const r = (t, e) => !!t && Object.prototype.hasOwnProperty.call(t, 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 isKeyExists = (obj, key) => {
13
+ return !!obj && Object.prototype.hasOwnProperty.call(obj, key);
14
+ };
2
15
  export {
3
- r as isKeyExists
16
+ isKeyExists
4
17
  };
@@ -1 +1,22 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../get/getUaData.cjs.js"),t=(e=!0)=>{const a=r.getUaData();return e?a.browserName==="safari"||a.browserName==="mobile-safari":a.browserName==="safari"};exports.isSafari=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 getUaData = require("../get/getUaData.cjs.js");
15
+ const isSafari = (includeMobileSafari = true) => {
16
+ const clientData = getUaData.getUaData();
17
+ if (includeMobileSafari) {
18
+ return clientData.browserName === "safari" || clientData.browserName === "mobile-safari";
19
+ }
20
+ return clientData.browserName === "safari";
21
+ };
22
+ exports.isSafari = isSafari;
@@ -1,8 +1,22 @@
1
- import { getUaData as e } from "../get/getUaData.es.js";
2
- const i = (a = !0) => {
3
- const r = e();
4
- return a ? r.browserName === "safari" || r.browserName === "mobile-safari" : r.browserName === "safari";
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 { getUaData } from "../get/getUaData.es.js";
13
+ const isSafari = (includeMobileSafari = true) => {
14
+ const clientData = getUaData();
15
+ if (includeMobileSafari) {
16
+ return clientData.browserName === "safari" || clientData.browserName === "mobile-safari";
17
+ }
18
+ return clientData.browserName === "safari";
5
19
  };
6
20
  export {
7
- i as isSafari
21
+ isSafari
8
22
  };
@@ -1 +1,19 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=l=>{const c=l.scrollWidth>l.clientWidth,i=l.scrollHeight>l.clientHeight;return c||i};exports.isScrollable=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 isScrollable = (element) => {
15
+ const isScrollableX = element.scrollWidth > element.clientWidth;
16
+ const isScrollableY = element.scrollHeight > element.clientHeight;
17
+ return isScrollableX || isScrollableY;
18
+ };
19
+ exports.isScrollable = isScrollable;
@@ -1,7 +1,19 @@
1
- const o = (l) => {
2
- const c = l.scrollWidth > l.clientWidth, i = l.scrollHeight > l.clientHeight;
3
- return c || i;
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 isScrollable = (element) => {
13
+ const isScrollableX = element.scrollWidth > element.clientWidth;
14
+ const isScrollableY = element.scrollHeight > element.clientHeight;
15
+ return isScrollableX || isScrollableY;
4
16
  };
5
17
  export {
6
- o as isScrollable
18
+ isScrollable
7
19
  };
@@ -1 +1,16 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("is-touch-device"),o=()=>e();exports.isTouchSupport=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 isTouchDevice = require("is-touch-device");
15
+ const isTouchSupport = () => isTouchDevice();
16
+ exports.isTouchSupport = isTouchSupport;
@@ -1,5 +1,16 @@
1
- import o from "is-touch-device";
2
- const i = () => 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 isTouchDevice from "is-touch-device";
13
+ const isTouchSupport = () => isTouchDevice();
3
14
  export {
4
- i as isTouchSupport
15
+ isTouchSupport
5
16
  };
@@ -1 +1,23 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("isomorphic-dompurify"),r=e=>t.sanitize(e,{ALLOWED_TAGS:[],KEEP_CONTENT:!0,USE_PROFILES:{html:!1}}).replace(/<\/?[^>]+(>|$)/g,"");exports.removeAllHtmlTags=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 DOMPurify = require("isomorphic-dompurify");
15
+ const removeAllHtmlTags = (string) => {
16
+ const sanitizeString = DOMPurify.sanitize(string, {
17
+ ALLOWED_TAGS: [],
18
+ KEEP_CONTENT: true,
19
+ USE_PROFILES: { html: false }
20
+ });
21
+ return sanitizeString.replace(/<\/?[^>]+(>|$)/g, "");
22
+ };
23
+ exports.removeAllHtmlTags = removeAllHtmlTags;