umaki 0.6.2 → 0.6.3
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 +22 -0
- package/dist/LICENSE.txt +1 -1
- package/dist/_virtual/_commonjsHelpers.cjs.js +1 -1
- package/dist/_virtual/_commonjsHelpers.es.js +1 -1
- package/dist/_virtual/isBetween.cjs.js +1 -1
- package/dist/_virtual/isBetween.es.js +1 -1
- package/dist/_virtual/timezone.cjs.js +1 -1
- package/dist/_virtual/timezone.es.js +1 -1
- package/dist/_virtual/utc.cjs.js +1 -1
- package/dist/_virtual/utc.es.js +1 -1
- package/dist/index.cjs.js +3 -1
- package/dist/index.es.js +3 -1
- package/dist/libs/config/defaultConfig.cjs.js +1 -1
- package/dist/libs/config/defaultConfig.es.js +1 -1
- package/dist/libs/config/getConfig.cjs.js +1 -1
- package/dist/libs/config/getConfig.es.js +1 -1
- package/dist/libs/config/setConfig.cjs.js +1 -1
- package/dist/libs/config/setConfig.es.js +1 -1
- package/dist/libs/control/bgScrollStop.cjs.js +1 -1
- package/dist/libs/control/bgScrollStop.es.js +1 -1
- package/dist/libs/control/pd.cjs.js +1 -1
- package/dist/libs/control/pd.es.js +1 -1
- package/dist/libs/control/scrollToHash.cjs.js +1 -1
- package/dist/libs/control/scrollToHash.es.js +1 -1
- package/dist/libs/control/videoPlayControl.cjs.js +1 -1
- package/dist/libs/control/videoPlayControl.es.js +1 -1
- package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +3 -3
- package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +3 -3
- package/dist/libs/convert/jsonStringToJsonObject.cjs.js +1 -1
- package/dist/libs/convert/jsonStringToJsonObject.es.js +1 -1
- package/dist/libs/eventControl/debounce.cjs.js +1 -1
- package/dist/libs/eventControl/debounce.es.js +1 -1
- package/dist/libs/eventControl/throttle.cjs.js +1 -1
- package/dist/libs/eventControl/throttle.es.js +1 -1
- package/dist/libs/get/getAspectRatio.cjs.js +1 -1
- package/dist/libs/get/getAspectRatio.es.js +1 -1
- package/dist/libs/get/getClassNames.cjs.js +1 -1
- package/dist/libs/get/getClassNames.es.js +1 -1
- package/dist/libs/get/getDocumentHeight.cjs.js +1 -1
- package/dist/libs/get/getDocumentHeight.es.js +1 -1
- package/dist/libs/get/getEventPaths.cjs.js +1 -1
- package/dist/libs/get/getEventPaths.es.js +1 -1
- package/dist/libs/get/getGcd.cjs.js +1 -1
- package/dist/libs/get/getGcd.es.js +1 -1
- package/dist/libs/get/getGravatarUrl.cjs.js +20 -0
- package/dist/libs/get/getGravatarUrl.d.ts +12 -0
- package/dist/libs/get/getGravatarUrl.es.js +20 -0
- package/dist/libs/get/getGravatarUrl.test.d.ts +1 -0
- package/dist/libs/get/getOrientation.cjs.js +1 -1
- package/dist/libs/get/getOrientation.es.js +1 -1
- package/dist/libs/get/getParentList.cjs.js +1 -1
- package/dist/libs/get/getParentList.es.js +1 -1
- package/dist/libs/get/getQueryParams.cjs.js +1 -1
- package/dist/libs/get/getQueryParams.es.js +1 -1
- package/dist/libs/get/getRem.cjs.js +1 -1
- package/dist/libs/get/getRem.es.js +1 -1
- package/dist/libs/get/getScrollbarWidth.cjs.js +1 -1
- package/dist/libs/get/getScrollbarWidth.es.js +1 -1
- package/dist/libs/get/getSessionStorage.cjs.js +1 -1
- package/dist/libs/get/getSessionStorage.es.js +1 -1
- package/dist/libs/get/getStringLength.cjs.js +1 -1
- package/dist/libs/get/getStringLength.es.js +1 -1
- package/dist/libs/get/getStylePropertyValue.cjs.js +1 -1
- package/dist/libs/get/getStylePropertyValue.es.js +1 -1
- package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +1 -1
- package/dist/libs/get/getStylePropertyValueToNumber.es.js +1 -1
- package/dist/libs/get/getUaData.cjs.js +1 -1
- package/dist/libs/get/getUaData.es.js +1 -1
- package/dist/libs/get/index.d.ts +1 -0
- package/dist/libs/is/checkDeviceSize.cjs.js +1 -1
- package/dist/libs/is/checkDeviceSize.es.js +1 -1
- package/dist/libs/is/isAfterDateTime.cjs.js +1 -1
- package/dist/libs/is/isAfterDateTime.es.js +1 -1
- package/dist/libs/is/isBetweenDateTime.cjs.js +2 -2
- package/dist/libs/is/isBetweenDateTime.es.js +2 -2
- package/dist/libs/is/isExistAllElements.cjs.js +1 -1
- package/dist/libs/is/isExistAllElements.es.js +1 -1
- package/dist/libs/is/isIpad.cjs.js +1 -1
- package/dist/libs/is/isIpad.es.js +1 -1
- package/dist/libs/is/isKeyExists.cjs.js +1 -1
- package/dist/libs/is/isKeyExists.es.js +1 -1
- package/dist/libs/is/isSafari.cjs.js +1 -1
- package/dist/libs/is/isSafari.es.js +1 -1
- package/dist/libs/is/isScrollable.cjs.js +1 -1
- package/dist/libs/is/isScrollable.es.js +1 -1
- package/dist/libs/is/isTouchSupport.cjs.js +1 -1
- package/dist/libs/is/isTouchSupport.es.js +1 -1
- package/dist/libs/remove/removeAllHtmlTags.cjs.js +1 -1
- package/dist/libs/remove/removeAllHtmlTags.es.js +1 -1
- package/dist/libs/remove/removeAttribute.cjs.js +1 -1
- package/dist/libs/remove/removeAttribute.es.js +1 -1
- package/dist/libs/remove/removeSessionStorage.cjs.js +1 -1
- package/dist/libs/remove/removeSessionStorage.es.js +1 -1
- package/dist/libs/remove/removeStylePropertyValue.cjs.js +1 -1
- package/dist/libs/remove/removeStylePropertyValue.es.js +1 -1
- package/dist/libs/security/htmlSanitize.cjs.js +1 -1
- package/dist/libs/security/htmlSanitize.es.js +1 -1
- package/dist/libs/set/set100vh.cjs.js +1 -1
- package/dist/libs/set/set100vh.es.js +1 -1
- package/dist/libs/set/set100vw.cjs.js +1 -1
- package/dist/libs/set/set100vw.es.js +1 -1
- package/dist/libs/set/setAttribute.cjs.js +1 -1
- package/dist/libs/set/setAttribute.es.js +1 -1
- package/dist/libs/set/setScrollPositionToCenter.cjs.js +1 -1
- package/dist/libs/set/setScrollPositionToCenter.es.js +1 -1
- package/dist/libs/set/setSessionStorage.cjs.js +1 -1
- package/dist/libs/set/setSessionStorage.es.js +1 -1
- package/dist/libs/set/setStylePropertyValue.cjs.js +1 -1
- package/dist/libs/set/setStylePropertyValue.es.js +1 -1
- package/dist/libs/to/toBoolean.cjs.js +1 -1
- package/dist/libs/to/toBoolean.es.js +1 -1
- package/dist/libs/to/toPositiveNumber.cjs.js +1 -1
- package/dist/libs/to/toPositiveNumber.es.js +1 -1
- package/dist/libs/transform/wrapTextWithSpans.cjs.js +1 -1
- package/dist/libs/transform/wrapTextWithSpans.es.js +1 -1
- package/dist/libs/wait/sleep.cjs.js +1 -1
- package/dist/libs/wait/sleep.es.js +1 -1
- package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +1 -1
- package/dist/libs/wait/waitForAllMediaLoaded.es.js +1 -1
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isBetween.cjs.js +2 -2
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isBetween.es.js +2 -2
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/timezone.cjs.js +2 -2
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/timezone.es.js +2 -2
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/utc.cjs.js +12 -13
- package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/utc.es.js +12 -13
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ console.log(breakpoint); // e.g. 768 (default) or custom value if set
|
|
|
73
73
|
- [getDocumentHeight](#getdocumentheight)
|
|
74
74
|
- [getEventPaths](#geteventpaths)
|
|
75
75
|
- [getGcd](#getgcd)
|
|
76
|
+
- [getGravatarUrl](#getgravatarurl)
|
|
76
77
|
- [getOrientation](#getorientation)
|
|
77
78
|
- [getParentList](#getparentlist)
|
|
78
79
|
- [getQueryParams](#getqueryparams)
|
|
@@ -335,6 +336,27 @@ console.log(gcd); // 6
|
|
|
335
336
|
|
|
336
337
|
[View file →](src/libs/get/getGcd.ts)
|
|
337
338
|
|
|
339
|
+
### getGravatarUrl
|
|
340
|
+
|
|
341
|
+
A function that generates a Gravatar avatar image URL from an email address and size parameter.
|
|
342
|
+
|
|
343
|
+
```ts
|
|
344
|
+
import { getGravatarUrl } from "umaki";
|
|
345
|
+
|
|
346
|
+
const avatarUrl = getGravatarUrl('user@example.com', 80);
|
|
347
|
+
console.log(avatarUrl);
|
|
348
|
+
// 'https://www.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af?s=80&d=404'
|
|
349
|
+
|
|
350
|
+
// Different size
|
|
351
|
+
const largeAvatar = getGravatarUrl('user@example.com', 200);
|
|
352
|
+
|
|
353
|
+
// Email with uppercase and whitespace (automatically normalized)
|
|
354
|
+
const normalizedAvatar = getGravatarUrl(' USER@EXAMPLE.COM ', 80);
|
|
355
|
+
// Same result as above due to normalization
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
[View file →](src/libs/get/getGravatarUrl.ts)
|
|
359
|
+
|
|
338
360
|
### getOrientation
|
|
339
361
|
|
|
340
362
|
A function that retrieves the current orientation of the device.
|
package/dist/LICENSE.txt
CHANGED
package/dist/_virtual/utc.cjs.js
CHANGED
package/dist/_virtual/utc.es.js
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*!
|
|
3
3
|
* name: umaki
|
|
4
|
-
* version: v0.6.
|
|
4
|
+
* version: v0.6.3
|
|
5
5
|
* description: A utility that is often used in web production.
|
|
6
6
|
* author: TsubasaHiga
|
|
7
7
|
* homepage: https://github.com/TsubasaHiga/umaki
|
|
@@ -27,6 +27,7 @@ const getClassNames = require("./libs/get/getClassNames.cjs.js");
|
|
|
27
27
|
const getDocumentHeight = require("./libs/get/getDocumentHeight.cjs.js");
|
|
28
28
|
const getEventPaths = require("./libs/get/getEventPaths.cjs.js");
|
|
29
29
|
const getGcd = require("./libs/get/getGcd.cjs.js");
|
|
30
|
+
const getGravatarUrl = require("./libs/get/getGravatarUrl.cjs.js");
|
|
30
31
|
const getOrientation = require("./libs/get/getOrientation.cjs.js");
|
|
31
32
|
const getParentList = require("./libs/get/getParentList.cjs.js");
|
|
32
33
|
const getQueryParams = require("./libs/get/getQueryParams.cjs.js");
|
|
@@ -79,6 +80,7 @@ exports.getClassNames = getClassNames.getClassNames;
|
|
|
79
80
|
exports.getDocumentHeight = getDocumentHeight.getDocumentHeight;
|
|
80
81
|
exports.getEventPaths = getEventPaths.getEventPaths;
|
|
81
82
|
exports.getGcd = getGcd.getGcd;
|
|
83
|
+
exports.getGravatarUrl = getGravatarUrl.getGravatarUrl;
|
|
82
84
|
exports.getOrientation = getOrientation.getOrientation;
|
|
83
85
|
exports.getParentList = getParentList.getParentList;
|
|
84
86
|
exports.getQueryParams = getQueryParams.getQueryParams;
|
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: umaki
|
|
3
|
-
* version: v0.6.
|
|
3
|
+
* version: v0.6.3
|
|
4
4
|
* description: A utility that is often used in web production.
|
|
5
5
|
* author: TsubasaHiga
|
|
6
6
|
* homepage: https://github.com/TsubasaHiga/umaki
|
|
@@ -25,6 +25,7 @@ import { getClassNames } from "./libs/get/getClassNames.es.js";
|
|
|
25
25
|
import { getDocumentHeight } from "./libs/get/getDocumentHeight.es.js";
|
|
26
26
|
import { getEventPaths } from "./libs/get/getEventPaths.es.js";
|
|
27
27
|
import { getGcd } from "./libs/get/getGcd.es.js";
|
|
28
|
+
import { getGravatarUrl } from "./libs/get/getGravatarUrl.es.js";
|
|
28
29
|
import { getOrientation } from "./libs/get/getOrientation.es.js";
|
|
29
30
|
import { getParentList } from "./libs/get/getParentList.es.js";
|
|
30
31
|
import { getQueryParams } from "./libs/get/getQueryParams.es.js";
|
|
@@ -73,6 +74,7 @@ export {
|
|
|
73
74
|
getDocumentHeight,
|
|
74
75
|
getEventPaths,
|
|
75
76
|
getGcd,
|
|
77
|
+
getGravatarUrl,
|
|
76
78
|
getOrientation,
|
|
77
79
|
getParentList,
|
|
78
80
|
getQueryParams,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*!
|
|
3
3
|
* name: umaki
|
|
4
|
-
* version: v0.6.
|
|
4
|
+
* version: v0.6.3
|
|
5
5
|
* description: A utility that is often used in web production.
|
|
6
6
|
* author: TsubasaHiga
|
|
7
7
|
* homepage: https://github.com/TsubasaHiga/umaki
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
14
|
const dayjs = require("dayjs");
|
|
15
|
-
const timezone = require("../../node_modules/.pnpm/dayjs@1.11.
|
|
16
|
-
const utc = require("../../node_modules/.pnpm/dayjs@1.11.
|
|
15
|
+
const timezone = require("../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/timezone.cjs.js");
|
|
16
|
+
const utc = require("../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/utc.cjs.js");
|
|
17
17
|
const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", tz) => {
|
|
18
18
|
if (tz) {
|
|
19
19
|
dayjs.extend(utc.default);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: umaki
|
|
3
|
-
* version: v0.6.
|
|
3
|
+
* version: v0.6.3
|
|
4
4
|
* description: A utility that is often used in web production.
|
|
5
5
|
* author: TsubasaHiga
|
|
6
6
|
* homepage: https://github.com/TsubasaHiga/umaki
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* For license information, please see LICENSE.txt
|
|
11
11
|
*/
|
|
12
12
|
import dayjs from "dayjs";
|
|
13
|
-
import timezone from "../../node_modules/.pnpm/dayjs@1.11.
|
|
14
|
-
import utc from "../../node_modules/.pnpm/dayjs@1.11.
|
|
13
|
+
import timezone from "../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/timezone.es.js";
|
|
14
|
+
import utc from "../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/utc.es.js";
|
|
15
15
|
const changeDateStringToSpecificFormat = (date, format = "YYYY年MM月DD日", tz) => {
|
|
16
16
|
if (tz) {
|
|
17
17
|
dayjs.extend(utc);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.6.3
|
|
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 md5 = require("md5");
|
|
15
|
+
const getGravatarUrl = (email, size) => {
|
|
16
|
+
const normalizedEmail = email.trim().toLowerCase();
|
|
17
|
+
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(normalizedEmail)}?s=${size}&d=404`;
|
|
18
|
+
return gravatarUrl;
|
|
19
|
+
};
|
|
20
|
+
exports.getGravatarUrl = getGravatarUrl;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a Gravatar avatar image URL from an email address and size parameter.
|
|
3
|
+
*
|
|
4
|
+
* This function creates a Gravatar URL by normalizing the email (trimming whitespace
|
|
5
|
+
* and converting to lowercase), generating an MD5 hash, and appending the size
|
|
6
|
+
* parameter with a 404 fallback.
|
|
7
|
+
*
|
|
8
|
+
* @param email - The email address to generate the Gravatar URL for.
|
|
9
|
+
* @param size - The size of the avatar image in pixels.
|
|
10
|
+
* @returns The Gravatar avatar image URL.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getGravatarUrl: (email: string, size: number) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.6.3
|
|
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 md5 from "md5";
|
|
13
|
+
const getGravatarUrl = (email, size) => {
|
|
14
|
+
const normalizedEmail = email.trim().toLowerCase();
|
|
15
|
+
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(normalizedEmail)}?s=${size}&d=404`;
|
|
16
|
+
return gravatarUrl;
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
getGravatarUrl
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|