umt 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/module/Array/first.d.ts +7 -0
- package/module/Array/first.js +10 -0
- package/module/Array/first.js.map +1 -0
- package/module/Array/generateNumberArray.d.ts +11 -0
- package/module/Array/generateNumberArray.js +27 -0
- package/module/Array/generateNumberArray.js.map +1 -0
- package/module/Array/index.d.ts +3 -0
- package/module/Array/index.js +3 -0
- package/module/Array/index.js.map +1 -1
- package/module/Array/randomSelect.d.ts +9 -0
- package/module/Array/randomSelect.js +22 -0
- package/module/Array/randomSelect.js.map +1 -0
- package/module/Date/format.d.ts +7 -0
- package/module/Date/format.js +48 -0
- package/module/Date/format.js.map +1 -0
- package/module/Date/getTimezoneOffsetString.d.ts +6 -0
- package/module/Date/getTimezoneOffsetString.js +14 -0
- package/module/Date/getTimezoneOffsetString.js.map +1 -0
- package/module/Date/index.d.ts +2 -0
- package/module/Date/index.js +2 -0
- package/module/Date/index.js.map +1 -1
- package/module/Error/index.d.ts +1 -1
- package/module/Error/index.js +1 -1
- package/module/Error/index.js.map +1 -1
- package/module/Error/safeExecute.d.ts +11 -0
- package/module/Error/safeExecute.js +14 -0
- package/module/Error/safeExecute.js.map +1 -0
- package/module/IP/subnetMaskToCidr.js +1 -1
- package/module/IP/subnetMaskToCidr.js.map +1 -1
- package/module/Math/bitwise.d.ts +13 -0
- package/module/Math/bitwise.js +27 -0
- package/module/Math/bitwise.js.map +1 -0
- package/module/Math/calculator/convertCurrency.d.ts +1 -1
- package/module/Math/index.d.ts +3 -1
- package/module/Math/index.js +3 -1
- package/module/Math/index.js.map +1 -1
- package/module/Math/linearCongruentialGenerator.d.ts +11 -0
- package/module/Math/linearCongruentialGenerator.js +16 -0
- package/module/Math/linearCongruentialGenerator.js.map +1 -0
- package/module/Math/uuidv7.d.ts +6 -0
- package/module/Math/uuidv7.js +36 -0
- package/module/Math/uuidv7.js.map +1 -0
- package/module/Math/xoshiro256.d.ts +8 -0
- package/module/Math/xoshiro256.js +21 -0
- package/module/Math/xoshiro256.js.map +1 -0
- package/module/Tool/sudoku.d.ts +103 -0
- package/module/Tool/sudoku.js +48 -0
- package/module/Tool/sudoku.js.map +1 -0
- package/module/Validate/array/core.d.ts +1 -1
- package/module/Validate/index.d.ts +1 -0
- package/module/Validate/index.js +1 -0
- package/module/Validate/index.js.map +1 -1
- package/module/Validate/isDouble.d.ts +1 -1
- package/module/Validate/isNumber.d.ts +1 -1
- package/module/Validate/isValueNaN.d.ts +10 -0
- package/module/Validate/isValueNaN.js +14 -0
- package/module/Validate/isValueNaN.js.map +1 -0
- package/module/Validate/object/core.d.ts +1 -1
- package/module/Validate/string/uuid.d.ts +6 -1
- package/module/Validate/string/uuid.js +5 -0
- package/module/Validate/string/uuid.js.map +1 -1
- package/module/types/int.d.ts +5 -2
- package/module/types/logicType.d.ts +1 -0
- package/package.json +16 -14
- package/module/Math/toBinary.d.ts +0 -8
- package/module/Math/toBinary.js +0 -11
- package/module/Math/toBinary.js.map +0 -1
- package/module/Simple/Tool/birthdaySimple.d.ts +0 -19
- package/module/Simple/Tool/birthdaySimple.js +0 -31
- package/module/Simple/Tool/birthdaySimple.js.map +0 -1
- package/module/Simple/Tool/dayOfWeekSimple.d.ts +0 -20
- package/module/Simple/Tool/dayOfWeekSimple.js +0 -34
- package/module/Simple/Tool/dayOfWeekSimple.js.map +0 -1
- package/module/Simple/Tool/deviationValueSimple.d.ts +0 -13
- package/module/Simple/Tool/deviationValueSimple.js +0 -19
- package/module/Simple/Tool/deviationValueSimple.js.map +0 -1
- package/module/Simple/Tool/index.d.ts +0 -3
- package/module/Simple/Tool/index.js +0 -4
- package/module/Simple/Tool/index.js.map +0 -1
- package/module/String/deleteSpace.d.ts +0 -7
- package/module/String/deleteSpace.js +0 -10
- package/module/String/deleteSpace.js.map +0 -1
- package/module/Tool/birthday.d.ts +0 -11
- package/module/Tool/birthday.js +0 -21
- package/module/Tool/birthday.js.map +0 -1
- package/module/Tool/cmykToRgba.d.ts +0 -12
- package/module/Tool/cmykToRgba.js +0 -41
- package/module/Tool/cmykToRgba.js.map +0 -1
- package/module/Tool/dayOfWeek.d.ts +0 -14
- package/module/Tool/dayOfWeek.js +0 -17
- package/module/Tool/dayOfWeek.js.map +0 -1
- package/module/Tool/deleteSpace.d.ts +0 -7
- package/module/Tool/deleteSpace.js +0 -10
- package/module/Tool/deleteSpace.js.map +0 -1
- package/module/Tool/hexToRgba.d.ts +0 -12
- package/module/Tool/hexToRgba.js +0 -20
- package/module/Tool/hexToRgba.js.map +0 -1
- package/module/Tool/hexaToRgba.d.ts +0 -12
- package/module/Tool/hexaToRgba.js +0 -20
- package/module/Tool/hexaToRgba.js.map +0 -1
- package/module/Tool/hslaToRgba.d.ts +0 -15
- package/module/Tool/hslaToRgba.js +0 -76
- package/module/Tool/hslaToRgba.js.map +0 -1
- package/module/Tool/rgbaToCmyk.d.ts +0 -18
- package/module/Tool/rgbaToCmyk.js +0 -26
- package/module/Tool/rgbaToCmyk.js.map +0 -1
- package/module/Tool/rgbaToHexA.d.ts +0 -12
- package/module/Tool/rgbaToHexA.js +0 -25
- package/module/Tool/rgbaToHexA.js.map +0 -1
- package/module/Tool/rgbaToHsla.d.ts +0 -17
- package/module/Tool/rgbaToHsla.js +0 -48
- package/module/Tool/rgbaToHsla.js.map +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { int } from "../types/int";
|
|
2
|
+
export type SudokuProps = [
|
|
3
|
+
[
|
|
4
|
+
int,
|
|
5
|
+
int,
|
|
6
|
+
int,
|
|
7
|
+
int,
|
|
8
|
+
int,
|
|
9
|
+
int,
|
|
10
|
+
int,
|
|
11
|
+
int,
|
|
12
|
+
int
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
int,
|
|
16
|
+
int,
|
|
17
|
+
int,
|
|
18
|
+
int,
|
|
19
|
+
int,
|
|
20
|
+
int,
|
|
21
|
+
int,
|
|
22
|
+
int,
|
|
23
|
+
int
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
int,
|
|
27
|
+
int,
|
|
28
|
+
int,
|
|
29
|
+
int,
|
|
30
|
+
int,
|
|
31
|
+
int,
|
|
32
|
+
int,
|
|
33
|
+
int,
|
|
34
|
+
int
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
int,
|
|
38
|
+
int,
|
|
39
|
+
int,
|
|
40
|
+
int,
|
|
41
|
+
int,
|
|
42
|
+
int,
|
|
43
|
+
int,
|
|
44
|
+
int,
|
|
45
|
+
int
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
int,
|
|
49
|
+
int,
|
|
50
|
+
int,
|
|
51
|
+
int,
|
|
52
|
+
int,
|
|
53
|
+
int,
|
|
54
|
+
int,
|
|
55
|
+
int,
|
|
56
|
+
int
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
int,
|
|
60
|
+
int,
|
|
61
|
+
int,
|
|
62
|
+
int,
|
|
63
|
+
int,
|
|
64
|
+
int,
|
|
65
|
+
int,
|
|
66
|
+
int,
|
|
67
|
+
int
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
int,
|
|
71
|
+
int,
|
|
72
|
+
int,
|
|
73
|
+
int,
|
|
74
|
+
int,
|
|
75
|
+
int,
|
|
76
|
+
int,
|
|
77
|
+
int,
|
|
78
|
+
int
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
int,
|
|
82
|
+
int,
|
|
83
|
+
int,
|
|
84
|
+
int,
|
|
85
|
+
int,
|
|
86
|
+
int,
|
|
87
|
+
int,
|
|
88
|
+
int,
|
|
89
|
+
int
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
int,
|
|
93
|
+
int,
|
|
94
|
+
int,
|
|
95
|
+
int,
|
|
96
|
+
int,
|
|
97
|
+
int,
|
|
98
|
+
int,
|
|
99
|
+
int,
|
|
100
|
+
int
|
|
101
|
+
]
|
|
102
|
+
];
|
|
103
|
+
export declare const sudoku: (grid: SudokuProps) => boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const sudoku = (grid) => {
|
|
2
|
+
const findEmptyCell = () => {
|
|
3
|
+
for (let row = 0; row < 9; row++) {
|
|
4
|
+
for (let col = 0; col < 9; col++) {
|
|
5
|
+
if (grid[row][col] === 0) {
|
|
6
|
+
return [row, col];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
};
|
|
12
|
+
const isValid = (row, col, num) => {
|
|
13
|
+
for (let i = 0; i < 9; i++) {
|
|
14
|
+
if (grid[row][i] === num || grid[i][col] === num) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const boxRow = Math.floor(row / 3) * 3;
|
|
19
|
+
const boxCol = Math.floor(col / 3) * 3;
|
|
20
|
+
for (let i = boxRow; i < boxRow + 3; i++) {
|
|
21
|
+
for (let j = boxCol; j < boxCol + 3; j++) {
|
|
22
|
+
if (grid[i][j] === num) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
};
|
|
29
|
+
const solve = () => {
|
|
30
|
+
const emptyCell = findEmptyCell();
|
|
31
|
+
if (emptyCell === null) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
const [row, col] = emptyCell;
|
|
35
|
+
for (let num = 1; num <= 9; num++) {
|
|
36
|
+
if (isValid(row, col, num)) {
|
|
37
|
+
grid[row][col] = num;
|
|
38
|
+
if (solve()) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
grid[row][col] = 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
};
|
|
46
|
+
return solve();
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=sudoku.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sudoku.js","sourceRoot":"","sources":["../../src/Tool/sudoku.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAiB,EAAE,EAAE;IAC1C,MAAM,aAAa,GAAG,GAA4B,EAAE;QAClD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;YACjC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;gBACjC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;oBACzB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAW,EAAE;QACjE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC;gBACjD,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;oBACvB,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,GAAY,EAAE;QAC1B,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC;QAClC,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;QAC7B,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;YAClC,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,GAAU,CAAC;gBAC5B,IAAI,KAAK,EAAE,EAAE,CAAC;oBACZ,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,KAAK,EAAE,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Types, ValidateCoreReturnType, ValidateType } from "../../Validate/type";
|
|
2
|
-
export declare const array: <A extends string | number | boolean, O extends { [P in Types<A>]: (value: ValidateType<P>) => ValidateCoreReturnType<ValidateType<P>>; } = { [
|
|
2
|
+
export declare const array: <A extends string | number | boolean, O extends { [P in Types<A>]: (value: ValidateType<P>) => ValidateCoreReturnType<ValidateType<P>>; } = { [P in Types<A>]: (value: ValidateType<P>) => ValidateCoreReturnType<ValidateType<P>>; }>(option?: O, message?: string) => (values: A[]) => ValidateCoreReturnType<A[]>;
|
package/module/Validate/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Validate/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB,iBAAiB;AACjB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Validate/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB,iBAAiB;AACjB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* isDouble("0.1"); // true
|
|
8
8
|
* isDouble("0.1", false); // false
|
|
9
9
|
*/
|
|
10
|
-
declare const isDouble: <T extends boolean = true>(x: unknown, loose?: T) => x is T extends true ?
|
|
10
|
+
declare const isDouble: <T extends boolean = true>(x: unknown, loose?: T) => x is T extends true ? number | string : number;
|
|
11
11
|
export { isDouble };
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* isNumber("0.1"); // true
|
|
8
8
|
* isNumber("0.1", false); // false
|
|
9
9
|
*/
|
|
10
|
-
declare const isNumber: <T extends boolean>(number: unknown, loose?: T) => number is T extends true ?
|
|
10
|
+
declare const isNumber: <T extends boolean>(number: unknown, loose?: T) => number is T extends true ? number | string : number;
|
|
11
11
|
export { isNumber };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 値がNaNかどうかを判定します。
|
|
3
|
+
* @param value
|
|
4
|
+
* @param loose 文字列も対象にするかどうか (default: false)
|
|
5
|
+
* @returns boolean
|
|
6
|
+
* @example isValueNaN(1); // false
|
|
7
|
+
* isValueNaN("NaN"); // false
|
|
8
|
+
* isValueNaN("NaN", true); // true
|
|
9
|
+
*/
|
|
10
|
+
export declare const isValueNaN: (value: unknown, loose?: boolean) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 値がNaNかどうかを判定します。
|
|
3
|
+
* @param value
|
|
4
|
+
* @param loose 文字列も対象にするかどうか (default: false)
|
|
5
|
+
* @returns boolean
|
|
6
|
+
* @example isValueNaN(1); // false
|
|
7
|
+
* isValueNaN("NaN"); // false
|
|
8
|
+
* isValueNaN("NaN", true); // true
|
|
9
|
+
*/
|
|
10
|
+
export const isValueNaN = (value, loose = false) => {
|
|
11
|
+
// biome-ignore lint/suspicious/noGlobalIsNan: <explanation>
|
|
12
|
+
return loose ? isNaN(value) : Number.isNaN(value);
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=isValueNaN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValueNaN.js","sourceRoot":"","sources":["../../src/Validate/isValueNaN.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAE,KAAK,GAAG,KAAK,EAAW,EAAE;IACnE,4DAA4D;IAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC,CAAC"}
|
|
@@ -4,5 +4,5 @@ export declare const object: <T extends {
|
|
|
4
4
|
}>(option?: T, message?: string) => (value: { [key in keyof T]: ValidateType<ReturnType<T[key]>["type"]>; }) => {
|
|
5
5
|
validate: boolean;
|
|
6
6
|
message: string;
|
|
7
|
-
type: { [
|
|
7
|
+
type: { [key in keyof T]: ValidateType<ReturnType<T[key]>["type"]>; };
|
|
8
8
|
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { ValidateReturnType } from "../../Validate/type";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 文字列がUUIDかどうかを検証するValidate関数
|
|
4
|
+
* @param {number[]} versions バージョン (default: [4])
|
|
5
|
+
* @param {string} message エラーメッセージ
|
|
6
|
+
*/
|
|
7
|
+
export declare const uuid: (versions?: number[], message?: string) => ValidateReturnType<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../../src/Validate/string/uuid.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../../src/Validate/string/uuid.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,WAAqB,CAAC,CAAC,CAAC,EACxB,OAAgB,EACY,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE,QAAQ;IACd,OAAO;IACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAC/B,eAAe;YACf,MAAM,YAAY,GAAG,IAAI,MAAM,CAC7B,8BAA8B,OAAO,+CAA+C,EACpF,GAAG,CACJ,CAAC;YACF,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/module/types/int.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type intEven = 0 | 2 | 4 | 6 | 8;
|
|
2
|
+
export type intOdd = 1 | 3 | 5 | 7 | 9;
|
|
3
|
+
export type intWithoutZero = Exclude<intEven | intOdd, 0>;
|
|
4
|
+
export type int = intEven | intOdd;
|
|
2
5
|
export type upToTwenty = 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
|
|
3
6
|
export type upToThirty = 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
|
|
4
7
|
export type upToForty = 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40;
|
|
@@ -102,4 +105,4 @@ export type doubleDigitInt = upToTwenty | upToThirty | upToForty | upToFifty | u
|
|
|
102
105
|
export type doubleDigit = `${doubleDigitInt}`;
|
|
103
106
|
export type tripleDigitInt = upToHundredTen | upToHundredTwenty | upToHundredThirty | upToHundredForty | upToHundredFifty | upToHundredSixty | upToHundredSeventy | upToHundredEighty | upToHundredNinety | upToTwoHundred | upToTwoHundredTen | upToTwoHundredTwenty | upToTwoHundredThirty | upToTwoHundredForty | upToTwoHundredFifty | upToTwoHundredSixty | upToTwoHundredSeventy | upToTwoHundredEighty | upToTwoHundredNinety | upToThreeHundred | upToThreeHundredTen | upToThreeHundredTwenty | upToThreeHundredThirty | upToThreeHundredForty | upToThreeHundredFifty | upToThreeHundredSixty | upToThreeHundredSeventy | upToThreeHundredEighty | upToThreeHundredNinety | upToFourHundred | upToFourHundredTen | upToFourHundredTwenty | upToFourHundredThirty | upToFourHundredForty | upToFourHundredFifty | upToFourHundredSixty | upToFourHundredSeventy | upToFourHundredEighty | upToFourHundredNinety | upToFiveHundred | upToFiveHundredTen | upToFiveHundredTwenty | upToFiveHundredThirty | upToFiveHundredForty | upToFiveHundredFifty | upToFiveHundredSixty | upToFiveHundredSeventy | upToFiveHundredEighty | upToFiveHundredNinety | upToSixHundred | upToSixHundredTen | upToSixHundredTwenty | upToSixHundredThirty | upToSixHundredForty | upToSixHundredFifty | upToSixHundredSixty | upToSixHundredSeventy | upToSixHundredEighty | upToSixHundredNinety | upToSevenHundred | upToSevenHundredTen | upToSevenHundredTwenty | upToSevenHundredThirty | upToSevenHundredForty | upToSevenHundredFifty | upToSevenHundredSixty | upToSevenHundredSeventy | upToSevenHundredEighty | upToSevenHundredNinety | upToEightHundred | upToEightHundredTen | upToEightHundredTwenty | upToEightHundredThirty | upToEightHundredForty | upToEightHundredFifty | upToEightHundredSixty | upToEightHundredSeventy | upToEightHundredEighty | upToEightHundredNinety | upToNineHundred | upToNineHundredTen | upToNineHundredTwenty | upToNineHundredThirty | upToNineHundredForty | upToNineHundredFifty | upToNineHundredSixty | upToNineHundredSeventy | upToNineHundredEighty | upToNineHundredNinety | upToNineHundredNinetyNine;
|
|
104
107
|
export type tripleDigit = `${tripleDigitInt}`;
|
|
105
|
-
export type fourDigit = `${
|
|
108
|
+
export type fourDigit = `${intWithoutZero}${int}${int}${int}`;
|
|
@@ -16,6 +16,7 @@ export type LengthOfString<S extends string> = StringToArray<S>["length"];
|
|
|
16
16
|
export type Capitalize<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;
|
|
17
17
|
export type Shift<T extends unknown[]> = T extends [unknown, ...infer R] ? R : never;
|
|
18
18
|
export type Pop<T extends unknown[]> = T extends [...infer R, unknown] ? R : never;
|
|
19
|
+
export type First<T extends unknown[]> = T extends [infer F, ...unknown[]] ? F : never;
|
|
19
20
|
export type ShiftString<S extends string> = S extends `${string}${infer R}` ? R : never;
|
|
20
21
|
export type PopString<S extends string> = S extends `${infer R}${string}` ? R : never;
|
|
21
22
|
export type StringToUnion<S extends string> = S extends `${infer F}${infer R}` ? F | StringToUnion<R> : never;
|
package/package.json
CHANGED
|
@@ -5,26 +5,26 @@
|
|
|
5
5
|
},
|
|
6
6
|
"description": "個人的に作った便利関数集 個人用途なので破壊的変更がある可能性があります。 Main Packageに依存関係はありません。 JavaScriptからの呼び出しに対応しています。",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@biomejs/biome": "1.
|
|
9
|
-
"@swc/core": "^1.5
|
|
8
|
+
"@biomejs/biome": "1.8.2",
|
|
9
|
+
"@swc/core": "^1.6.5",
|
|
10
10
|
"@swc/jest": "^0.2.36",
|
|
11
11
|
"@types/jest": "^29.5.12",
|
|
12
|
-
"@types/node": "^20.
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
14
|
-
"@typescript-eslint/parser": "^7.
|
|
15
|
-
"bun-types": "^1.1.
|
|
16
|
-
"dependency-cruiser": "^16.3.
|
|
17
|
-
"eslint": "^9.
|
|
12
|
+
"@types/node": "^20.14.8",
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
|
14
|
+
"@typescript-eslint/parser": "^7.14.1",
|
|
15
|
+
"bun-types": "^1.1.16",
|
|
16
|
+
"dependency-cruiser": "^16.3.3",
|
|
17
|
+
"eslint": "^9.5.0",
|
|
18
18
|
"eslint-plugin-import": "^2.29.1",
|
|
19
|
-
"eslint-plugin-unicorn": "^
|
|
19
|
+
"eslint-plugin-unicorn": "^54.0.0",
|
|
20
20
|
"gh-pages": "^6.1.1",
|
|
21
21
|
"jest": "^29.7.0",
|
|
22
|
-
"ts-jest": "^29.1.
|
|
22
|
+
"ts-jest": "^29.1.5",
|
|
23
23
|
"ts-node": "^10.9.2",
|
|
24
24
|
"tsc-alias": "^1.8.10",
|
|
25
|
-
"typedoc": "^0.
|
|
26
|
-
"typescript": "^5.
|
|
27
|
-
"umt": "^1.7.
|
|
25
|
+
"typedoc": "^0.26.2",
|
|
26
|
+
"typescript": "^5.5.2",
|
|
27
|
+
"umt": "^1.7.2"
|
|
28
28
|
},
|
|
29
29
|
"directories": {
|
|
30
30
|
"doc": "doc",
|
|
@@ -53,11 +53,13 @@
|
|
|
53
53
|
"eslint": "eslint src",
|
|
54
54
|
"format": "biome format . --write",
|
|
55
55
|
"lint": "yarn eslint --fix && biome ci . && tsc",
|
|
56
|
+
"lint:ci": "yarn eslint && biome ci . && tsc",
|
|
56
57
|
"test": "jest",
|
|
57
58
|
"test-debug": "cd test && tsc",
|
|
58
59
|
"ts-node": "yarn build && ts-node --project tmp/tsconfig.json tmp/src/index.ts"
|
|
59
60
|
},
|
|
60
61
|
"type": "module",
|
|
61
62
|
"types": "module/index.d.js",
|
|
62
|
-
"version": "1.
|
|
63
|
+
"version": "1.8.0",
|
|
64
|
+
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
|
63
65
|
}
|
package/module/Math/toBinary.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toBinary.js","sourceRoot":"","sources":["../../src/Math/toBinary.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAC/C,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { hoursTypeInt } from "../../types/clockType";
|
|
2
|
-
import type { dayType, monType } from "../../types/dateType";
|
|
3
|
-
export type BIRTHDAYSIMPLE = <T extends monType>(birthdays: Date | `${number}-${T}-${dayType<T>}` | `${number}:${T}:${dayType<T>}` | `${number}/${T}/${dayType<T>}` | {
|
|
4
|
-
year: number;
|
|
5
|
-
mon: number;
|
|
6
|
-
day: number;
|
|
7
|
-
}, timeDifference?: hoursTypeInt) => number;
|
|
8
|
-
/**
|
|
9
|
-
* 年齢を取得する
|
|
10
|
-
* @param birthdays - 誕生日
|
|
11
|
-
* @param timeDifference - 時差 (default: 9)
|
|
12
|
-
* @returns number
|
|
13
|
-
* @example birthdaySimple("2000-01-01");
|
|
14
|
-
* birthdaySimple("2000:01:01");
|
|
15
|
-
* birthdaySimple("2000/01/01");
|
|
16
|
-
* birthdaySimple({ year: 2000, mon: 1, day: 1 });
|
|
17
|
-
* birthdaySimple(new Date(2000, 0, 1));
|
|
18
|
-
*/
|
|
19
|
-
export declare const birthdaySimple: BIRTHDAYSIMPLE;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { birthday } from "../../Date/birthday";
|
|
2
|
-
/**
|
|
3
|
-
* 年齢を取得する
|
|
4
|
-
* @param birthdays - 誕生日
|
|
5
|
-
* @param timeDifference - 時差 (default: 9)
|
|
6
|
-
* @returns number
|
|
7
|
-
* @example birthdaySimple("2000-01-01");
|
|
8
|
-
* birthdaySimple("2000:01:01");
|
|
9
|
-
* birthdaySimple("2000/01/01");
|
|
10
|
-
* birthdaySimple({ year: 2000, mon: 1, day: 1 });
|
|
11
|
-
* birthdaySimple(new Date(2000, 0, 1));
|
|
12
|
-
*/
|
|
13
|
-
export const birthdaySimple = ((birthdays, timeDifference = 9) => {
|
|
14
|
-
if (typeof birthdays === "string") {
|
|
15
|
-
if (birthdays.includes(":")) {
|
|
16
|
-
const [year, mon, day] = birthdays.split(":").map(Number);
|
|
17
|
-
return birthday(year, mon, day, timeDifference);
|
|
18
|
-
}
|
|
19
|
-
if (birthdays.includes("/")) {
|
|
20
|
-
const [year, mon, day] = birthdays.split("/").map(Number);
|
|
21
|
-
return birthday(year, mon, day, timeDifference);
|
|
22
|
-
}
|
|
23
|
-
const [year, mon, day] = birthdays.split("-").map(Number);
|
|
24
|
-
return birthday(year, mon, day, timeDifference);
|
|
25
|
-
}
|
|
26
|
-
if (birthdays instanceof Date) {
|
|
27
|
-
return birthday(birthdays.getFullYear(), birthdays.getMonth(), birthdays.getDate(), timeDifference);
|
|
28
|
-
}
|
|
29
|
-
return birthday(birthdays.year, birthdays.mon, birthdays.day, timeDifference);
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=birthdaySimple.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"birthdaySimple.js","sourceRoot":"","sources":["../../../src/Simple/Tool/birthdaySimple.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAU3C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAC7B,SAK8C,EAC9C,iBAA+B,CAAC,EAChC,EAAE;IACF,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAIvD,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAIvD,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAIvD,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,SAAS,YAAY,IAAI,EAAE,CAAC;QAC9B,OAAO,QAAQ,CACb,SAAS,CAAC,WAAW,EAAE,EACvB,SAAS,CAAC,QAAQ,EAAgB,EAClC,SAAS,CAAC,OAAO,EAA4B,EAC7C,cAAc,CACf,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CACb,SAAS,CAAC,IAAI,EACd,SAAS,CAAC,GAAiB,EAC3B,SAAS,CAAC,GAA6B,EACvC,cAAc,CACf,CAAC;AACJ,CAAC,CAAmB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { hoursTypeInt } from "../../types/clockType";
|
|
2
|
-
import type { MonthsWith31Days, MonthsWith31DaysInt, MonthsWithout31Days, MonthsWithout31DaysInt, convertMonTypeZero, dayType, dayTypeInt } from "../../types/dateType";
|
|
3
|
-
/**
|
|
4
|
-
* 曜日を取得する
|
|
5
|
-
* @param properties - 年月日
|
|
6
|
-
* @param timeDifference - 時差 (default: 9)
|
|
7
|
-
* @returns number
|
|
8
|
-
* @example dayOfWeekSimple("2000-01-01");
|
|
9
|
-
* dayOfWeekSimple("2000:01:01");
|
|
10
|
-
* dayOfWeekSimple("2000/01/01");
|
|
11
|
-
* dayOfWeekSimple({ year: 2000, mon: 1, day: 1 });
|
|
12
|
-
* dayOfWeekSimple(new Date(2000, 0, 1));
|
|
13
|
-
*/
|
|
14
|
-
declare function dayOfWeekSimple<T extends MonthsWith31DaysInt | MonthsWithout31DaysInt>(properties?: {
|
|
15
|
-
year?: number;
|
|
16
|
-
mon?: T;
|
|
17
|
-
day?: dayTypeInt<T>;
|
|
18
|
-
}, timeDifference?: hoursTypeInt): number;
|
|
19
|
-
declare function dayOfWeekSimple<T extends MonthsWith31Days | MonthsWithout31Days>(properties?: `${number}-${convertMonTypeZero<T>}-${dayType<T>}` | `${number}:${convertMonTypeZero<T>}:${dayType<T>}` | `${number}/${convertMonTypeZero<T>}/${dayType<T>}` | Date, timeDifference?: hoursTypeInt): number;
|
|
20
|
-
export { dayOfWeekSimple };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { dayOfWeek } from "../../Date/dayOfWeek";
|
|
2
|
-
function dayOfWeekSimple(properties, timeDifference = 9) {
|
|
3
|
-
if (typeof properties === "string") {
|
|
4
|
-
if (properties.includes(":")) {
|
|
5
|
-
const [year, mon, day] = properties
|
|
6
|
-
.split(":")
|
|
7
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
8
|
-
.map(Number);
|
|
9
|
-
return dayOfWeek({ year, mon, day }, timeDifference);
|
|
10
|
-
}
|
|
11
|
-
if (properties.includes("/")) {
|
|
12
|
-
const [year, mon, day] = properties
|
|
13
|
-
.split("/")
|
|
14
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
15
|
-
.map(Number);
|
|
16
|
-
return dayOfWeek({ year, mon, day }, timeDifference);
|
|
17
|
-
}
|
|
18
|
-
const [year, mon, day] = properties
|
|
19
|
-
.split("-")
|
|
20
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
21
|
-
.map(Number);
|
|
22
|
-
return dayOfWeek({ year, mon, day }, timeDifference);
|
|
23
|
-
}
|
|
24
|
-
if (properties instanceof Date) {
|
|
25
|
-
return dayOfWeek({
|
|
26
|
-
year: properties.getFullYear(),
|
|
27
|
-
mon: (properties.getMonth() + 1),
|
|
28
|
-
day: properties.getDate(),
|
|
29
|
-
}, timeDifference);
|
|
30
|
-
}
|
|
31
|
-
return dayOfWeek(properties, timeDifference);
|
|
32
|
-
}
|
|
33
|
-
export { dayOfWeekSimple };
|
|
34
|
-
//# sourceMappingURL=dayOfWeekSimple.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dayOfWeekSimple.js","sourceRoot":"","sources":["../../../src/Simple/Tool/dayOfWeekSimple.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA8B7C,SAAS,eAAe,CAOtB,UAyBQ,EACR,iBAA+B,CAAC;IAEhC,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,UAAU;iBAChC,KAAK,CAAC,GAAG,CAAC;gBACX,4DAA4D;iBAC3D,GAAG,CAAC,MAAM,CAAQ,CAAC;YACtB,OAAO,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,UAAU;iBAChC,KAAK,CAAC,GAAG,CAAC;gBACX,4DAA4D;iBAC3D,GAAG,CAAC,MAAM,CAAQ,CAAC;YACtB,OAAO,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;QACvD,CAAC;QACD,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,UAAU;aAChC,KAAK,CAAC,GAAG,CAAC;YACX,4DAA4D;aAC3D,GAAG,CAAC,MAAM,CAAQ,CAAC;QACtB,OAAO,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,UAAU,YAAY,IAAI,EAAE,CAAC;QAC/B,OAAO,SAAS,CACd;YACE,IAAI,EAAE,UAAU,CAAC,WAAW,EAAE;YAC9B,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,CAER;YACvB,GAAG,EAAE,UAAU,CAAC,OAAO,EAEtB;SACF,EACD,cAAc,CACf,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CACd,UAIC,EACD,cAAc,CACf,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface DeviationValueSimple {
|
|
2
|
-
(value: number, averageValue: number, standardDeviationValue: number): number;
|
|
3
|
-
(value: number, averageValue: number[]): number;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* 偏差値を返す
|
|
7
|
-
* @param {number} value 値
|
|
8
|
-
* @param {number|number[]} averageValue 平均値
|
|
9
|
-
* @param {number} standardDeviationValue 標準偏差
|
|
10
|
-
* @returns number
|
|
11
|
-
* @example deviationValueSimple(60, 50, 10); // 110
|
|
12
|
-
*/
|
|
13
|
-
export declare const deviationValueSimple: DeviationValueSimple;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { average } from "../../Math/average";
|
|
2
|
-
import { deviationValue } from "../../Math/deviationValue";
|
|
3
|
-
import { standardDeviation } from "../../Math/standardDeviation";
|
|
4
|
-
/**
|
|
5
|
-
* 偏差値を返す
|
|
6
|
-
* @param {number} value 値
|
|
7
|
-
* @param {number|number[]} averageValue 平均値
|
|
8
|
-
* @param {number} standardDeviationValue 標準偏差
|
|
9
|
-
* @returns number
|
|
10
|
-
* @example deviationValueSimple(60, 50, 10); // 110
|
|
11
|
-
*/
|
|
12
|
-
export const deviationValueSimple = ((value, averageValue, standardDeviationValue) => {
|
|
13
|
-
if (Array.isArray(averageValue)) {
|
|
14
|
-
const x = average(averageValue);
|
|
15
|
-
return deviationValue(value, x, standardDeviation(averageValue));
|
|
16
|
-
}
|
|
17
|
-
return deviationValue(value, averageValue, standardDeviationValue);
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=deviationValueSimple.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviationValueSimple.js","sourceRoot":"","sources":["../../../src/Simple/Tool/deviationValueSimple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAM7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CACnC,KAAa,EACb,YAA+B,EAC/B,sBAA8B,EAC9B,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QAChC,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;AACrE,CAAC,CAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Simple/Tool/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteSpace.js","sourceRoot":"","sources":["../../src/String/deleteSpace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;IAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { hoursTypeInt } from "../types/clockType";
|
|
2
|
-
import type { dayTypeInt, monTypeInt } from "../types/dateType";
|
|
3
|
-
/**
|
|
4
|
-
* @param {number} year
|
|
5
|
-
* @param {number} mon
|
|
6
|
-
* @param {number} day
|
|
7
|
-
* @param {number} [timeDifference=9] 時差
|
|
8
|
-
* @returns number 年齢
|
|
9
|
-
* @example birthday(2000, 1, 1); // 21
|
|
10
|
-
*/
|
|
11
|
-
export declare const birthday: <T extends monTypeInt>(year: number, mon: T, day: dayTypeInt<T>, timeDifference?: hoursTypeInt) => number;
|
package/module/Tool/birthday.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { newDateInt } from "../Date";
|
|
2
|
-
import { now } from "../Date/now";
|
|
3
|
-
/**
|
|
4
|
-
* @param {number} year
|
|
5
|
-
* @param {number} mon
|
|
6
|
-
* @param {number} day
|
|
7
|
-
* @param {number} [timeDifference=9] 時差
|
|
8
|
-
* @returns number 年齢
|
|
9
|
-
* @example birthday(2000, 1, 1); // 21
|
|
10
|
-
*/
|
|
11
|
-
export const birthday = (year, mon, day, timeDifference = 9) => {
|
|
12
|
-
const birthdayDate = new Date(newDateInt(year, mon, day));
|
|
13
|
-
const nowTime = now(timeDifference);
|
|
14
|
-
const y = nowTime.getFullYear() - birthdayDate.getFullYear();
|
|
15
|
-
const r = nowTime <
|
|
16
|
-
newDateInt(nowTime.getFullYear(), (birthdayDate.getMonth() - 1), birthdayDate.getDay())
|
|
17
|
-
? y - 1
|
|
18
|
-
: y;
|
|
19
|
-
return year < 100 ? 1900 + y : r;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=birthday.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"birthday.js","sourceRoot":"","sources":["../../src/Tool/birthday.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,IAAY,EACZ,GAAM,EACN,GAAkB,EAClB,iBAA+B,CAAC,EAChC,EAAE;IACF,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;IAC7D,MAAM,CAAC,GACL,OAAO;QACP,UAAU,CACR,OAAO,CAAC,WAAW,EAAE,EACrB,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAe,EAC3C,YAAY,CAAC,MAAM,EAAmB,CACvC;QACC,CAAC,CAAC,CAAC,GAAG,CAAC;QACP,CAAC,CAAC,CAAC,CAAC;IACR,OAAO,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* cmykをrgbaに変換する
|
|
3
|
-
* @param cmyk
|
|
4
|
-
* @returns { r: number; g: number; b: number; a: number; }
|
|
5
|
-
* @example cmykToRgba(100, 100, 0, 60.78) // { r: 0, g: 0, b: 100, a: 1 }
|
|
6
|
-
*/
|
|
7
|
-
export declare const cmykToRgba: (c: number, m: number, y: number, k: number, a?: number) => {
|
|
8
|
-
r: number;
|
|
9
|
-
g: number;
|
|
10
|
-
b: number;
|
|
11
|
-
a: number;
|
|
12
|
-
};
|