umaki 0.2.4 → 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.
- package/dist/LICENSE.txt +32 -0
- package/dist/_virtual/_commonjsHelpers.cjs.js +19 -1
- package/dist/_virtual/_commonjsHelpers.es.js +16 -5
- package/dist/_virtual/isBetween.cjs.js +15 -1
- package/dist/_virtual/isBetween.es.js +13 -2
- package/dist/index.cjs.js +99 -1
- package/dist/index.es.js +97 -86
- package/dist/libs/control/bgScrollStop.cjs.js +24 -1
- package/dist/libs/control/bgScrollStop.es.js +21 -4
- package/dist/libs/control/pd.cjs.js +15 -1
- package/dist/libs/control/pd.es.js +13 -2
- package/dist/libs/control/scrollToHash.cjs.js +47 -1
- package/dist/libs/control/scrollToHash.es.js +42 -16
- package/dist/libs/control/videoPlayControl.cjs.js +33 -1
- package/dist/libs/control/videoPlayControl.es.js +27 -10
- package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +16 -1
- package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +14 -3
- package/dist/libs/convert/jsonStringToJsonObject.cjs.js +20 -1
- package/dist/libs/convert/jsonStringToJsonObject.es.js +15 -4
- package/dist/libs/get/getAspectRatio.cjs.js +19 -1
- package/dist/libs/get/getAspectRatio.es.js +16 -5
- package/dist/libs/get/getClassNames.cjs.js +18 -1
- package/dist/libs/get/getClassNames.es.js +16 -2
- package/dist/libs/get/getDocumentHeight.cjs.js +15 -1
- package/dist/libs/get/getDocumentHeight.es.js +13 -2
- package/dist/libs/get/getEventPaths.cjs.js +35 -1
- package/dist/libs/get/getEventPaths.es.js +30 -12
- package/dist/libs/get/getGcd.cjs.js +21 -1
- package/dist/libs/get/getGcd.es.js +18 -5
- package/dist/libs/get/getOrientation.cjs.js +18 -1
- package/dist/libs/get/getOrientation.es.js +16 -2
- package/dist/libs/get/getParentList.cjs.js +19 -1
- package/dist/libs/get/getParentList.es.js +16 -4
- package/dist/libs/get/getQueryParams.cjs.js +30 -1
- package/dist/libs/get/getQueryParams.es.js +26 -12
- package/dist/libs/get/getRem.cjs.js +18 -1
- package/dist/libs/get/getRem.es.js +16 -2
- package/dist/libs/get/getScrollbarWidth.cjs.js +15 -1
- package/dist/libs/get/getScrollbarWidth.es.js +13 -2
- package/dist/libs/get/getSessionStorage.cjs.js +20 -1
- package/dist/libs/get/getSessionStorage.es.js +17 -5
- package/dist/libs/get/getStringLength.cjs.js +16 -1
- package/dist/libs/get/getStringLength.es.js +14 -3
- package/dist/libs/get/getStylePropertyValue.cjs.js +15 -1
- package/dist/libs/get/getStylePropertyValue.es.js +13 -2
- package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +16 -1
- package/dist/libs/get/getStylePropertyValueToNumber.es.js +14 -3
- package/dist/libs/get/getUaData.cjs.js +34 -1
- package/dist/libs/get/getUaData.es.js +30 -12
- package/dist/libs/is/isBetweenDateTime.cjs.js +25 -1
- package/dist/libs/is/isBetweenDateTime.es.js +21 -8
- package/dist/libs/is/isExistAllElements.cjs.js +17 -1
- package/dist/libs/is/isExistAllElements.es.js +15 -2
- package/dist/libs/is/isIpad.cjs.js +21 -1
- package/dist/libs/is/isIpad.es.js +18 -6
- package/dist/libs/is/isKeyExists.cjs.js +17 -1
- package/dist/libs/is/isKeyExists.es.js +15 -2
- package/dist/libs/is/isSafari.cjs.js +22 -1
- package/dist/libs/is/isSafari.es.js +19 -5
- package/dist/libs/is/isScrollable.cjs.js +19 -1
- package/dist/libs/is/isScrollable.es.js +16 -4
- package/dist/libs/is/isTouchSupport.cjs.js +16 -1
- package/dist/libs/is/isTouchSupport.es.js +14 -3
- package/dist/libs/remove/removeAllHtmlTags.cjs.js +23 -1
- package/dist/libs/remove/removeAllHtmlTags.es.js +21 -7
- package/dist/libs/remove/removeAttribute.cjs.js +17 -1
- package/dist/libs/remove/removeAttribute.es.js +14 -3
- package/dist/libs/remove/removeSessionStorage.cjs.js +18 -1
- package/dist/libs/remove/removeSessionStorage.es.js +15 -4
- package/dist/libs/remove/removeStylePropertyValue.cjs.js +17 -1
- package/dist/libs/remove/removeStylePropertyValue.es.js +14 -3
- package/dist/libs/set/set100vh.cjs.js +18 -1
- package/dist/libs/set/set100vh.es.js +15 -4
- package/dist/libs/set/set100vw.cjs.js +18 -1
- package/dist/libs/set/set100vw.es.js +15 -4
- package/dist/libs/set/setAttribute.cjs.js +17 -1
- package/dist/libs/set/setAttribute.es.js +14 -3
- package/dist/libs/set/setScrollPositionToCenter.cjs.js +21 -1
- package/dist/libs/set/setScrollPositionToCenter.es.js +18 -4
- package/dist/libs/set/setSessionStorage.cjs.js +18 -1
- package/dist/libs/set/setSessionStorage.es.js +15 -4
- package/dist/libs/set/setStylePropertyValue.cjs.js +17 -1
- package/dist/libs/set/setStylePropertyValue.es.js +14 -3
- package/dist/libs/to/toBoolean.cjs.js +17 -1
- package/dist/libs/to/toBoolean.es.js +15 -2
- package/dist/libs/to/toPositiveNumber.cjs.js +15 -1
- package/dist/libs/to/toPositiveNumber.es.js +13 -2
- package/dist/libs/transform/wrapTextWithSpans.cjs.js +31 -1
- package/dist/libs/transform/wrapTextWithSpans.es.js +27 -13
- package/dist/libs/wait/sleep.cjs.js +17 -1
- package/dist/libs/wait/sleep.es.js +15 -2
- package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +55 -1
- package/dist/libs/wait/waitForAllMediaLoaded.es.js +47 -20
- package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +30 -1
- package/dist/node_modules/dayjs/plugin/isBetween.es.js +25 -14
- package/package.json +2 -1
|
@@ -1,4 +1,15 @@
|
|
|
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 getScrollbarWidth = () => window.innerWidth - document.body.clientWidth;
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
getScrollbarWidth
|
|
4
15
|
};
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
19
|
+
getSessionStorage
|
|
8
20
|
};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
15
|
+
getStringLength
|
|
5
16
|
};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
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
|
-
|
|
14
|
+
getStylePropertyValue
|
|
4
15
|
};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
15
|
+
getStylePropertyValueToNumber
|
|
5
16
|
};
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
33
|
+
getUaData
|
|
16
34
|
};
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
18
|
+
}
|
|
19
|
+
const a = dayjs(dateA);
|
|
20
|
+
const b = dayjs(dateB);
|
|
21
|
+
return now.isBetween(a, b, "millisecond");
|
|
9
22
|
};
|
|
10
23
|
export {
|
|
11
|
-
|
|
24
|
+
isBetweenDateTime
|
|
12
25
|
};
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
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
|
-
|
|
16
|
+
isExistAllElements
|
|
4
17
|
};
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
20
|
+
isIpad
|
|
9
21
|
};
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
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
|
-
|
|
16
|
+
isKeyExists
|
|
4
17
|
};
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
21
|
+
isSafari
|
|
8
22
|
};
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
18
|
+
isScrollable
|
|
7
19
|
};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
15
|
+
isTouchSupport
|
|
5
16
|
};
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|