@moxon/api 6.0.0-pre
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/.prettierignore +5 -0
- package/LICENSE +28 -0
- package/README.md +277 -0
- package/dist/app.d.ts +2 -0
- package/dist/app.js +55 -0
- package/dist/app.js.map +1 -0
- package/dist/config/env.d.ts +22 -0
- package/dist/config/env.js +36 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/plans.d.ts +26 -0
- package/dist/config/plans.js +44 -0
- package/dist/config/plans.js.map +1 -0
- package/dist/config/versions.d.ts +18 -0
- package/dist/config/versions.js +248 -0
- package/dist/config/versions.js.map +1 -0
- package/dist/constants.d.ts +48 -0
- package/dist/constants.js +75 -0
- package/dist/constants.js.map +1 -0
- package/dist/middleware/cors.d.ts +2 -0
- package/dist/middleware/cors.js +31 -0
- package/dist/middleware/cors.js.map +1 -0
- package/dist/middleware/error.d.ts +4 -0
- package/dist/middleware/error.js +8 -0
- package/dist/middleware/error.js.map +1 -0
- package/dist/middleware/json.d.ts +2 -0
- package/dist/middleware/json.js +8 -0
- package/dist/middleware/json.js.map +1 -0
- package/dist/middleware/logger.d.ts +26 -0
- package/dist/middleware/logger.js +65 -0
- package/dist/middleware/logger.js.map +1 -0
- package/dist/middleware/ratelimit.d.ts +2 -0
- package/dist/middleware/ratelimit.js +83 -0
- package/dist/middleware/ratelimit.js.map +1 -0
- package/dist/middleware/version.d.ts +3 -0
- package/dist/middleware/version.js +30 -0
- package/dist/middleware/version.js.map +1 -0
- package/dist/modules/v4/address.d.ts +20 -0
- package/dist/modules/v4/address.js +381 -0
- package/dist/modules/v4/address.js.map +1 -0
- package/dist/modules/v4/agent.d.ts +30 -0
- package/dist/modules/v4/agent.js +92 -0
- package/dist/modules/v4/agent.js.map +1 -0
- package/dist/modules/v4/algorithms.d.ts +90 -0
- package/dist/modules/v4/algorithms.js +279 -0
- package/dist/modules/v4/algorithms.js.map +1 -0
- package/dist/modules/v4/avatar.d.ts +23 -0
- package/dist/modules/v4/avatar.js +136 -0
- package/dist/modules/v4/avatar.js.map +1 -0
- package/dist/modules/v4/barcode.d.ts +27 -0
- package/dist/modules/v4/barcode.js +440 -0
- package/dist/modules/v4/barcode.js.map +1 -0
- package/dist/modules/v4/captcha.d.ts +22 -0
- package/dist/modules/v4/captcha.js +79 -0
- package/dist/modules/v4/captcha.js.map +1 -0
- package/dist/modules/v4/chat.d.ts +21 -0
- package/dist/modules/v4/chat.js +100 -0
- package/dist/modules/v4/chat.js.map +1 -0
- package/dist/modules/v4/color.d.ts +16 -0
- package/dist/modules/v4/color.js +59 -0
- package/dist/modules/v4/color.js.map +1 -0
- package/dist/modules/v4/convert.d.ts +15 -0
- package/dist/modules/v4/convert.js +116 -0
- package/dist/modules/v4/convert.js.map +1 -0
- package/dist/modules/v4/credit.d.ts +22 -0
- package/dist/modules/v4/credit.js +104 -0
- package/dist/modules/v4/credit.js.map +1 -0
- package/dist/modules/v4/cron.d.ts +17 -0
- package/dist/modules/v4/cron.js +202 -0
- package/dist/modules/v4/cron.js.map +1 -0
- package/dist/modules/v4/dice.d.ts +16 -0
- package/dist/modules/v4/dice.js +37 -0
- package/dist/modules/v4/dice.js.map +1 -0
- package/dist/modules/v4/domain.d.ts +6 -0
- package/dist/modules/v4/domain.js +83 -0
- package/dist/modules/v4/domain.js.map +1 -0
- package/dist/modules/v4/encode.d.ts +81 -0
- package/dist/modules/v4/encode.js +236 -0
- package/dist/modules/v4/encode.js.map +1 -0
- package/dist/modules/v4/geo.d.ts +30 -0
- package/dist/modules/v4/geo.js +51 -0
- package/dist/modules/v4/geo.js.map +1 -0
- package/dist/modules/v4/hash.d.ts +15 -0
- package/dist/modules/v4/hash.js +25 -0
- package/dist/modules/v4/hash.js.map +1 -0
- package/dist/modules/v4/hyperplanning.d.ts +19 -0
- package/dist/modules/v4/hyperplanning.js +80 -0
- package/dist/modules/v4/hyperplanning.js.map +1 -0
- package/dist/modules/v4/ip.d.ts +19 -0
- package/dist/modules/v4/ip.js +132 -0
- package/dist/modules/v4/ip.js.map +1 -0
- package/dist/modules/v4/levenshtein.d.ts +13 -0
- package/dist/modules/v4/levenshtein.js +37 -0
- package/dist/modules/v4/levenshtein.js.map +1 -0
- package/dist/modules/v4/palette.d.ts +19 -0
- package/dist/modules/v4/palette.js +56 -0
- package/dist/modules/v4/palette.js.map +1 -0
- package/dist/modules/v4/password.d.ts +25 -0
- package/dist/modules/v4/password.js +343 -0
- package/dist/modules/v4/password.js.map +1 -0
- package/dist/modules/v4/personal.d.ts +6 -0
- package/dist/modules/v4/personal.js +121 -0
- package/dist/modules/v4/personal.js.map +1 -0
- package/dist/modules/v4/placeholder.d.ts +30 -0
- package/dist/modules/v4/placeholder.js +160 -0
- package/dist/modules/v4/placeholder.js.map +1 -0
- package/dist/modules/v4/qrcode.d.ts +25 -0
- package/dist/modules/v4/qrcode.js +92 -0
- package/dist/modules/v4/qrcode.js.map +1 -0
- package/dist/modules/v4/regex.d.ts +23 -0
- package/dist/modules/v4/regex.js +48 -0
- package/dist/modules/v4/regex.js.map +1 -0
- package/dist/modules/v4/statistics.d.ts +20 -0
- package/dist/modules/v4/statistics.js +48 -0
- package/dist/modules/v4/statistics.js.map +1 -0
- package/dist/modules/v4/text.d.ts +43 -0
- package/dist/modules/v4/text.js +323 -0
- package/dist/modules/v4/text.js.map +1 -0
- package/dist/modules/v4/tic_tac_toe.d.ts +19 -0
- package/dist/modules/v4/tic_tac_toe.js +214 -0
- package/dist/modules/v4/tic_tac_toe.js.map +1 -0
- package/dist/modules/v4/time.d.ts +15 -0
- package/dist/modules/v4/time.js +124 -0
- package/dist/modules/v4/time.js.map +1 -0
- package/dist/modules/v4/token.d.ts +9 -0
- package/dist/modules/v4/token.js +45 -0
- package/dist/modules/v4/token.js.map +1 -0
- package/dist/modules/v4/username.d.ts +6 -0
- package/dist/modules/v4/username.js +92 -0
- package/dist/modules/v4/username.js.map +1 -0
- package/dist/modules/v4/validate.d.ts +34 -0
- package/dist/modules/v4/validate.js +75 -0
- package/dist/modules/v4/validate.js.map +1 -0
- package/dist/modules/v4.d.ts +32 -0
- package/dist/modules/v4.js +33 -0
- package/dist/modules/v4.js.map +1 -0
- package/dist/modules/v5/address.d.ts +5 -0
- package/dist/modules/v5/address.js +20 -0
- package/dist/modules/v5/address.js.map +1 -0
- package/dist/modules/v5/algorithms.d.ts +9 -0
- package/dist/modules/v5/algorithms.js +39 -0
- package/dist/modules/v5/algorithms.js.map +1 -0
- package/dist/modules/v5/asymmetric.d.ts +26 -0
- package/dist/modules/v5/asymmetric.js +74 -0
- package/dist/modules/v5/asymmetric.js.map +1 -0
- package/dist/modules/v5/barcode.d.ts +27 -0
- package/dist/modules/v5/barcode.js +424 -0
- package/dist/modules/v5/barcode.js.map +1 -0
- package/dist/modules/v5/base.d.ts +16 -0
- package/dist/modules/v5/base.js +41 -0
- package/dist/modules/v5/base.js.map +1 -0
- package/dist/modules/v5/captcha.d.ts +27 -0
- package/dist/modules/v5/captcha.js +136 -0
- package/dist/modules/v5/captcha.js.map +1 -0
- package/dist/modules/v5/case.d.ts +10 -0
- package/dist/modules/v5/case.js +57 -0
- package/dist/modules/v5/case.js.map +1 -0
- package/dist/modules/v5/chart.d.ts +53 -0
- package/dist/modules/v5/chart.js +385 -0
- package/dist/modules/v5/chart.js.map +1 -0
- package/dist/modules/v5/chat.d.ts +21 -0
- package/dist/modules/v5/chat.js +107 -0
- package/dist/modules/v5/chat.js.map +1 -0
- package/dist/modules/v5/csv.d.ts +29 -0
- package/dist/modules/v5/csv.js +143 -0
- package/dist/modules/v5/csv.js.map +1 -0
- package/dist/modules/v5/diff.d.ts +20 -0
- package/dist/modules/v5/diff.js +81 -0
- package/dist/modules/v5/diff.js.map +1 -0
- package/dist/modules/v5/evaluate.d.ts +14 -0
- package/dist/modules/v5/evaluate.js +284 -0
- package/dist/modules/v5/evaluate.js.map +1 -0
- package/dist/modules/v5/jwt.d.ts +11 -0
- package/dist/modules/v5/jwt.js +42 -0
- package/dist/modules/v5/jwt.js.map +1 -0
- package/dist/modules/v5/matrix.d.ts +77 -0
- package/dist/modules/v5/matrix.js +239 -0
- package/dist/modules/v5/matrix.js.map +1 -0
- package/dist/modules/v5/otp.d.ts +30 -0
- package/dist/modules/v5/otp.js +117 -0
- package/dist/modules/v5/otp.js.map +1 -0
- package/dist/modules/v5/pow.d.ts +29 -0
- package/dist/modules/v5/pow.js +49 -0
- package/dist/modules/v5/pow.js.map +1 -0
- package/dist/modules/v5/read.d.ts +20 -0
- package/dist/modules/v5/read.js +59 -0
- package/dist/modules/v5/read.js.map +1 -0
- package/dist/modules/v5/semver.d.ts +33 -0
- package/dist/modules/v5/semver.js +99 -0
- package/dist/modules/v5/semver.js.map +1 -0
- package/dist/modules/v5/symmetric.d.ts +15 -0
- package/dist/modules/v5/symmetric.js +88 -0
- package/dist/modules/v5/symmetric.js.map +1 -0
- package/dist/modules/v5/text.d.ts +5 -0
- package/dist/modules/v5/text.js +12 -0
- package/dist/modules/v5/text.js.map +1 -0
- package/dist/modules/v5/tic_tac_toe.d.ts +19 -0
- package/dist/modules/v5/tic_tac_toe.js +226 -0
- package/dist/modules/v5/tic_tac_toe.js.map +1 -0
- package/dist/modules/v5/url.d.ts +18 -0
- package/dist/modules/v5/url.js +51 -0
- package/dist/modules/v5/url.js.map +1 -0
- package/dist/modules/v5/uuid.d.ts +25 -0
- package/dist/modules/v5/uuid.js +40 -0
- package/dist/modules/v5/uuid.js.map +1 -0
- package/dist/modules/v5.d.ts +24 -0
- package/dist/modules/v5.js +25 -0
- package/dist/modules/v5.js.map +1 -0
- package/dist/modules/v6.d.ts +1 -0
- package/dist/modules/v6.js +2 -0
- package/dist/modules/v6.js.map +1 -0
- package/dist/routes/delete.d.ts +2 -0
- package/dist/routes/delete.js +73 -0
- package/dist/routes/delete.js.map +1 -0
- package/dist/routes/get.d.ts +2 -0
- package/dist/routes/get.js +857 -0
- package/dist/routes/get.js.map +1 -0
- package/dist/routes/index.d.ts +2 -0
- package/dist/routes/index.js +95 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/patch.d.ts +2 -0
- package/dist/routes/patch.js +45 -0
- package/dist/routes/patch.js.map +1 -0
- package/dist/routes/post.d.ts +2 -0
- package/dist/routes/post.js +604 -0
- package/dist/routes/post.js.map +1 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.js +14 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/types/storage.d.ts +52 -0
- package/dist/types/storage.js +2 -0
- package/dist/types/storage.js.map +1 -0
- package/dist/utils/challenge.d.ts +40 -0
- package/dist/utils/challenge.js +75 -0
- package/dist/utils/challenge.js.map +1 -0
- package/dist/utils/colors.d.ts +44 -0
- package/dist/utils/colors.js +93 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/helpers.d.ts +55 -0
- package/dist/utils/helpers.js +82 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/response.d.ts +9 -0
- package/dist/utils/response.js +24 -0
- package/dist/utils/response.js.map +1 -0
- package/package.json +90 -0
- package/robots.txt +74 -0
- package/src/favicon.ico +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes the Levenshtein edit distance between two strings.
|
|
3
|
+
*
|
|
4
|
+
* @param str1 - First string
|
|
5
|
+
* @param str2 - Second string
|
|
6
|
+
* @returns Object containing both strings and the minimum number of single-character edits to transform one into the other
|
|
7
|
+
* @throws Error if either string is missing, not a string, or exceeds the maximum length
|
|
8
|
+
*/
|
|
9
|
+
export default function levenshtein(str1: string, str2: string): {
|
|
10
|
+
str1: string;
|
|
11
|
+
str2: string;
|
|
12
|
+
distance: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MAX_LEVENSHTEIN_LENGTH } from '../../constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Computes the Levenshtein edit distance between two strings.
|
|
4
|
+
*
|
|
5
|
+
* @param str1 - First string
|
|
6
|
+
* @param str2 - Second string
|
|
7
|
+
* @returns Object containing both strings and the minimum number of single-character edits to transform one into the other
|
|
8
|
+
* @throws Error if either string is missing, not a string, or exceeds the maximum length
|
|
9
|
+
*/
|
|
10
|
+
export default function levenshtein(str1, str2) {
|
|
11
|
+
if (!str1 || typeof str1 !== 'string') {
|
|
12
|
+
throw new Error('Please provide a valid first string');
|
|
13
|
+
}
|
|
14
|
+
if (!str2 || typeof str2 !== 'string') {
|
|
15
|
+
throw new Error('Please provide a valid second string');
|
|
16
|
+
}
|
|
17
|
+
if (str1.length > MAX_LEVENSHTEIN_LENGTH) {
|
|
18
|
+
throw new Error('First string exceeds 1000 characters');
|
|
19
|
+
}
|
|
20
|
+
if (str2.length > MAX_LEVENSHTEIN_LENGTH) {
|
|
21
|
+
throw new Error('Second string exceeds 1000 characters');
|
|
22
|
+
}
|
|
23
|
+
const m = Array.from({ length: str1.length + 1 }, (_, i) => [i]);
|
|
24
|
+
for (let j = 0; j <= str2.length; j++)
|
|
25
|
+
m[0][j] = j;
|
|
26
|
+
for (let i = 1; i <= str1.length; i++) {
|
|
27
|
+
for (let j = 1; j <= str2.length; j++) {
|
|
28
|
+
m[i][j] = Math.min(m[i - 1][j] + 1, m[i][j - 1] + 1, m[i - 1][j - 1] + (str1[i - 1] !== str2[j - 1] ? 1 : 0));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
str1,
|
|
33
|
+
str2,
|
|
34
|
+
distance: m[str1.length][str2.length],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=levenshtein.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"levenshtein.js","sourceRoot":"","sources":["../../../src/modules/v4/levenshtein.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,IAAY,EAAE,IAAY;IA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CAAC,CAAE,GAAG,CAAC,EACjB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAC,CAAC,GAAG,CAAC,CAAE,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC5D,CAAC;QACN,CAAC;IACL,CAAC;IAED,OAAO;QACH,IAAI;QACJ,IAAI;QACJ,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAE,CAAC,IAAI,CAAC,MAAM,CAAE;KAC1C,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PaletteColor {
|
|
2
|
+
hex: string;
|
|
3
|
+
rgb: string;
|
|
4
|
+
hsl: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PaletteResult {
|
|
7
|
+
base: PaletteColor;
|
|
8
|
+
type: string;
|
|
9
|
+
colors: PaletteColor[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generates a color palette from a base hex color using a specified harmony type.
|
|
13
|
+
*
|
|
14
|
+
* @param color - Base hex color (e.g. "#ff5733")
|
|
15
|
+
* @param type - Palette type: "complementary", "triadic", "analogous", "tetradic", or "split-complementary"
|
|
16
|
+
* @returns Object containing the base color and the derived palette colors in hex, RGB, and HSL
|
|
17
|
+
* @throws Error if color or type is missing, or the type is not one of the accepted values
|
|
18
|
+
*/
|
|
19
|
+
export default function palette(color: string, type: string): PaletteResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { hexToRgb, hslToRgb, rgbToHex, rgbToHsl } from '../../utils/colors.js';
|
|
2
|
+
function format(r, g, b) {
|
|
3
|
+
const [h, s, l] = rgbToHsl(r, g, b);
|
|
4
|
+
return {
|
|
5
|
+
hex: rgbToHex(r, g, b),
|
|
6
|
+
rgb: `rgb(${r}, ${g}, ${b})`,
|
|
7
|
+
hsl: `hsl(${h.toFixed(1)}, ${(s * 100).toFixed(1)}%, ${(l * 100).toFixed(1)}%)`,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function fromHueShifts(base, shifts) {
|
|
11
|
+
const [h, s, l] = base;
|
|
12
|
+
return shifts.map((shift) => {
|
|
13
|
+
const newH = (h + shift + 360) % 360;
|
|
14
|
+
const [r, g, b] = hslToRgb(newH, s, l);
|
|
15
|
+
return format(r, g, b);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generates a color palette from a base hex color using a specified harmony type.
|
|
20
|
+
*
|
|
21
|
+
* @param color - Base hex color (e.g. "#ff5733")
|
|
22
|
+
* @param type - Palette type: "complementary", "triadic", "analogous", "tetradic", or "split-complementary"
|
|
23
|
+
* @returns Object containing the base color and the derived palette colors in hex, RGB, and HSL
|
|
24
|
+
* @throws Error if color or type is missing, or the type is not one of the accepted values
|
|
25
|
+
*/
|
|
26
|
+
export default function palette(color, type) {
|
|
27
|
+
if (!color)
|
|
28
|
+
throw new Error('A base color is required');
|
|
29
|
+
if (!type)
|
|
30
|
+
throw new Error('A palette type is required');
|
|
31
|
+
const [r, g, b] = hexToRgb(color);
|
|
32
|
+
const base = format(r, g, b);
|
|
33
|
+
const hsl = rgbToHsl(r, g, b);
|
|
34
|
+
let colors;
|
|
35
|
+
switch (type) {
|
|
36
|
+
case 'complementary':
|
|
37
|
+
colors = fromHueShifts(hsl, [0, 180]);
|
|
38
|
+
break;
|
|
39
|
+
case 'triadic':
|
|
40
|
+
colors = fromHueShifts(hsl, [0, 120, 240]);
|
|
41
|
+
break;
|
|
42
|
+
case 'analogous':
|
|
43
|
+
colors = fromHueShifts(hsl, [-60, -30, 0, 30, 60]);
|
|
44
|
+
break;
|
|
45
|
+
case 'tetradic':
|
|
46
|
+
colors = fromHueShifts(hsl, [0, 90, 180, 270]);
|
|
47
|
+
break;
|
|
48
|
+
case 'split-complementary':
|
|
49
|
+
colors = fromHueShifts(hsl, [0, 150, 210]);
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
throw new Error('Type must be one of: complementary, triadic, analogous, tetradic, split-complementary');
|
|
53
|
+
}
|
|
54
|
+
return { base, type, colors };
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.js","sourceRoot":"","sources":["../../../src/modules/v4/palette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc/E,SAAS,MAAM,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAC3C,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,OAAO;QACH,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACtB,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC5B,GAAG,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;KAClF,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAAC,IAA8B,EAAE,MAAgB;IACnE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IACvB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QACrC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,C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C;YAC/C,MAAM;QACV,KAAK,qBAAqB;YACtB,MAAM,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YAC3C,MAAM;QACV;YACI,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;IACjH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface PasswordResult {
|
|
2
|
+
passwords: string[];
|
|
3
|
+
type: string;
|
|
4
|
+
length: number;
|
|
5
|
+
strength: string;
|
|
6
|
+
entropy: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Generates one or more passwords using random characters or passphrase mode.
|
|
10
|
+
*
|
|
11
|
+
* @param type - Generation mode: "random" or "passphrase"
|
|
12
|
+
* @param length - Password length for random mode (8–128), or word count for passphrase mode (3–10)
|
|
13
|
+
* @param options - Character set options: uppercase, lowercase, digits, symbols, exclude, count, separator
|
|
14
|
+
* @returns Generated passwords with type, length, strength and entropy
|
|
15
|
+
* @throws Error if no charset is active, length is out of range, or count exceeds the maximum
|
|
16
|
+
*/
|
|
17
|
+
export default function password(type?: string, length?: number, options?: {
|
|
18
|
+
uppercase?: boolean;
|
|
19
|
+
lowercase?: boolean;
|
|
20
|
+
digits?: boolean;
|
|
21
|
+
symbols?: boolean;
|
|
22
|
+
exclude?: string;
|
|
23
|
+
count?: number;
|
|
24
|
+
separator?: string;
|
|
25
|
+
}): PasswordResult;
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { randomInt } from 'crypto';
|
|
2
|
+
import { MAX_PASSWORD_COUNT, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH } from '../../constants.js';
|
|
3
|
+
const UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
4
|
+
const LOWER = 'abcdefghijklmnopqrstuvwxyz';
|
|
5
|
+
const DIGITS = '0123456789';
|
|
6
|
+
const SYMBOLS = '!@#$%^&*()-_=+[]{}|;:,.<>?';
|
|
7
|
+
const WORDLIST = [
|
|
8
|
+
'apple',
|
|
9
|
+
'brave',
|
|
10
|
+
'chair',
|
|
11
|
+
'dance',
|
|
12
|
+
'eagle',
|
|
13
|
+
'fancy',
|
|
14
|
+
'grace',
|
|
15
|
+
'house',
|
|
16
|
+
'ivory',
|
|
17
|
+
'joker',
|
|
18
|
+
'kneel',
|
|
19
|
+
'lemon',
|
|
20
|
+
'maple',
|
|
21
|
+
'noble',
|
|
22
|
+
'ocean',
|
|
23
|
+
'piano',
|
|
24
|
+
'queen',
|
|
25
|
+
'river',
|
|
26
|
+
'stone',
|
|
27
|
+
'tiger',
|
|
28
|
+
'ultra',
|
|
29
|
+
'vivid',
|
|
30
|
+
'waste',
|
|
31
|
+
'xenon',
|
|
32
|
+
'yacht',
|
|
33
|
+
'zebra',
|
|
34
|
+
'amber',
|
|
35
|
+
'blaze',
|
|
36
|
+
'coral',
|
|
37
|
+
'drift',
|
|
38
|
+
'ember',
|
|
39
|
+
'flora',
|
|
40
|
+
'globe',
|
|
41
|
+
'haven',
|
|
42
|
+
'input',
|
|
43
|
+
'jumpy',
|
|
44
|
+
'karma',
|
|
45
|
+
'lunar',
|
|
46
|
+
'magic',
|
|
47
|
+
'night',
|
|
48
|
+
'optic',
|
|
49
|
+
'proxy',
|
|
50
|
+
'quirk',
|
|
51
|
+
'radar',
|
|
52
|
+
'solar',
|
|
53
|
+
'trace',
|
|
54
|
+
'umbra',
|
|
55
|
+
'vapor',
|
|
56
|
+
'witch',
|
|
57
|
+
'xylem',
|
|
58
|
+
'yield',
|
|
59
|
+
'zippy',
|
|
60
|
+
'alpha',
|
|
61
|
+
'brisk',
|
|
62
|
+
'crane',
|
|
63
|
+
'depth',
|
|
64
|
+
'event',
|
|
65
|
+
'frost',
|
|
66
|
+
'grime',
|
|
67
|
+
'harsh',
|
|
68
|
+
'index',
|
|
69
|
+
'joint',
|
|
70
|
+
'knack',
|
|
71
|
+
'level',
|
|
72
|
+
'minus',
|
|
73
|
+
'nerve',
|
|
74
|
+
'onset',
|
|
75
|
+
'phase',
|
|
76
|
+
'quest',
|
|
77
|
+
'ratio',
|
|
78
|
+
'scope',
|
|
79
|
+
'trend',
|
|
80
|
+
'union',
|
|
81
|
+
'valve',
|
|
82
|
+
'weary',
|
|
83
|
+
'young',
|
|
84
|
+
'blunt',
|
|
85
|
+
'clean',
|
|
86
|
+
'drive',
|
|
87
|
+
'earth',
|
|
88
|
+
'fiber',
|
|
89
|
+
'grain',
|
|
90
|
+
'grind',
|
|
91
|
+
'horse',
|
|
92
|
+
'ideal',
|
|
93
|
+
'issue',
|
|
94
|
+
'judge',
|
|
95
|
+
'juice',
|
|
96
|
+
'knave',
|
|
97
|
+
'large',
|
|
98
|
+
'laser',
|
|
99
|
+
'light',
|
|
100
|
+
'limit',
|
|
101
|
+
'media',
|
|
102
|
+
'merit',
|
|
103
|
+
'metal',
|
|
104
|
+
'model',
|
|
105
|
+
'money',
|
|
106
|
+
'month',
|
|
107
|
+
'motor',
|
|
108
|
+
'mount',
|
|
109
|
+
'music',
|
|
110
|
+
'nerve',
|
|
111
|
+
'noise',
|
|
112
|
+
'north',
|
|
113
|
+
'noted',
|
|
114
|
+
'novel',
|
|
115
|
+
'nurse',
|
|
116
|
+
'oasis',
|
|
117
|
+
'offer',
|
|
118
|
+
'olive',
|
|
119
|
+
'omega',
|
|
120
|
+
'other',
|
|
121
|
+
'outer',
|
|
122
|
+
'owner',
|
|
123
|
+
'oxide',
|
|
124
|
+
'ozone',
|
|
125
|
+
'paint',
|
|
126
|
+
'panel',
|
|
127
|
+
'paper',
|
|
128
|
+
'patch',
|
|
129
|
+
'pause',
|
|
130
|
+
'peace',
|
|
131
|
+
'pearl',
|
|
132
|
+
'pedal',
|
|
133
|
+
'plain',
|
|
134
|
+
'plank',
|
|
135
|
+
'plant',
|
|
136
|
+
'plate',
|
|
137
|
+
'plaza',
|
|
138
|
+
'pluck',
|
|
139
|
+
'plumb',
|
|
140
|
+
'plume',
|
|
141
|
+
'plunge',
|
|
142
|
+
'point',
|
|
143
|
+
'polar',
|
|
144
|
+
'power',
|
|
145
|
+
'press',
|
|
146
|
+
'pride',
|
|
147
|
+
'prime',
|
|
148
|
+
'print',
|
|
149
|
+
'prism',
|
|
150
|
+
'prize',
|
|
151
|
+
'probe',
|
|
152
|
+
'prone',
|
|
153
|
+
'proof',
|
|
154
|
+
'prose',
|
|
155
|
+
'proud',
|
|
156
|
+
'prove',
|
|
157
|
+
'prowl',
|
|
158
|
+
'pulse',
|
|
159
|
+
'punch',
|
|
160
|
+
'pupil',
|
|
161
|
+
'purge',
|
|
162
|
+
'swift',
|
|
163
|
+
'sword',
|
|
164
|
+
'table',
|
|
165
|
+
'taint',
|
|
166
|
+
'tally',
|
|
167
|
+
'taste',
|
|
168
|
+
'teach',
|
|
169
|
+
'teeth',
|
|
170
|
+
'tempo',
|
|
171
|
+
'tense',
|
|
172
|
+
'tenth',
|
|
173
|
+
'terms',
|
|
174
|
+
'terra',
|
|
175
|
+
'thick',
|
|
176
|
+
'thing',
|
|
177
|
+
'think',
|
|
178
|
+
'thorn',
|
|
179
|
+
'three',
|
|
180
|
+
'throw',
|
|
181
|
+
'thumb',
|
|
182
|
+
'tidal',
|
|
183
|
+
'tight',
|
|
184
|
+
'tilde',
|
|
185
|
+
'timer',
|
|
186
|
+
'title',
|
|
187
|
+
'token',
|
|
188
|
+
'torch',
|
|
189
|
+
'total',
|
|
190
|
+
'touch',
|
|
191
|
+
'tough',
|
|
192
|
+
'tower',
|
|
193
|
+
'track',
|
|
194
|
+
'trade',
|
|
195
|
+
'trail',
|
|
196
|
+
'train',
|
|
197
|
+
'trait',
|
|
198
|
+
'tramp',
|
|
199
|
+
'tread',
|
|
200
|
+
'treat',
|
|
201
|
+
'trees',
|
|
202
|
+
'trial',
|
|
203
|
+
'tribe',
|
|
204
|
+
'trick',
|
|
205
|
+
'tried',
|
|
206
|
+
'troop',
|
|
207
|
+
'trove',
|
|
208
|
+
'truce',
|
|
209
|
+
'truck',
|
|
210
|
+
'truly',
|
|
211
|
+
'trunk',
|
|
212
|
+
'truth',
|
|
213
|
+
'tulip',
|
|
214
|
+
'tumor',
|
|
215
|
+
'tuner',
|
|
216
|
+
'tunic',
|
|
217
|
+
'tweak',
|
|
218
|
+
'twice',
|
|
219
|
+
'twirl',
|
|
220
|
+
'twist',
|
|
221
|
+
'typed',
|
|
222
|
+
'under',
|
|
223
|
+
'unify',
|
|
224
|
+
'unite',
|
|
225
|
+
'unity',
|
|
226
|
+
'until',
|
|
227
|
+
'upper',
|
|
228
|
+
'upset',
|
|
229
|
+
'urban',
|
|
230
|
+
'usage',
|
|
231
|
+
'valid',
|
|
232
|
+
'value',
|
|
233
|
+
'visor',
|
|
234
|
+
'vital',
|
|
235
|
+
'vivid',
|
|
236
|
+
'vocab',
|
|
237
|
+
'vocal',
|
|
238
|
+
'voice',
|
|
239
|
+
'voter',
|
|
240
|
+
'vault',
|
|
241
|
+
'venue',
|
|
242
|
+
'verse',
|
|
243
|
+
'watch',
|
|
244
|
+
'water',
|
|
245
|
+
'weave',
|
|
246
|
+
'wedge',
|
|
247
|
+
'weird',
|
|
248
|
+
'wheel',
|
|
249
|
+
'where',
|
|
250
|
+
'which',
|
|
251
|
+
'while',
|
|
252
|
+
'white',
|
|
253
|
+
'whole',
|
|
254
|
+
'wider',
|
|
255
|
+
'windy',
|
|
256
|
+
'wired',
|
|
257
|
+
'world',
|
|
258
|
+
'worse',
|
|
259
|
+
'worth',
|
|
260
|
+
'would',
|
|
261
|
+
'wound',
|
|
262
|
+
'write',
|
|
263
|
+
'wrong',
|
|
264
|
+
'wrote',
|
|
265
|
+
'years',
|
|
266
|
+
'yield',
|
|
267
|
+
'yours',
|
|
268
|
+
];
|
|
269
|
+
function computeStrength(entropy) {
|
|
270
|
+
if (entropy < 40)
|
|
271
|
+
return 'weak';
|
|
272
|
+
if (entropy < 60)
|
|
273
|
+
return 'moderate';
|
|
274
|
+
if (entropy < 80)
|
|
275
|
+
return 'strong';
|
|
276
|
+
return 'very_strong';
|
|
277
|
+
}
|
|
278
|
+
function generateRandom(length, charset) {
|
|
279
|
+
return Array.from({ length }, () => charset[randomInt(charset.length)]).join('');
|
|
280
|
+
}
|
|
281
|
+
function generatePassphrase(wordCount, separator) {
|
|
282
|
+
return Array.from({ length: wordCount }, () => WORDLIST[randomInt(WORDLIST.length)]).join(separator);
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Generates one or more passwords using random characters or passphrase mode.
|
|
286
|
+
*
|
|
287
|
+
* @param type - Generation mode: "random" or "passphrase"
|
|
288
|
+
* @param length - Password length for random mode (8–128), or word count for passphrase mode (3–10)
|
|
289
|
+
* @param options - Character set options: uppercase, lowercase, digits, symbols, exclude, count, separator
|
|
290
|
+
* @returns Generated passwords with type, length, strength and entropy
|
|
291
|
+
* @throws Error if no charset is active, length is out of range, or count exceeds the maximum
|
|
292
|
+
*/
|
|
293
|
+
export default function password(type = 'random', length = 16, options = {}) {
|
|
294
|
+
const { uppercase = true, lowercase = true, digits = true, symbols = false, exclude = '', count = 1, separator = '-', } = options;
|
|
295
|
+
if (count < 1 || count > MAX_PASSWORD_COUNT) {
|
|
296
|
+
throw new Error(`Count must be between 1 and ${MAX_PASSWORD_COUNT}`);
|
|
297
|
+
}
|
|
298
|
+
if (type === 'passphrase') {
|
|
299
|
+
const wordCount = Math.max(3, Math.min(10, length));
|
|
300
|
+
const entropy = Math.log2(Math.pow(WORDLIST.length, wordCount));
|
|
301
|
+
const passwords = Array.from({ length: count }, () => generatePassphrase(wordCount, separator));
|
|
302
|
+
return {
|
|
303
|
+
passwords,
|
|
304
|
+
type: 'passphrase',
|
|
305
|
+
length: wordCount,
|
|
306
|
+
strength: computeStrength(entropy),
|
|
307
|
+
entropy: Math.round(entropy * 10) / 10,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
if (type !== 'random') {
|
|
311
|
+
throw new Error('Type must be "random" or "passphrase"');
|
|
312
|
+
}
|
|
313
|
+
if (isNaN(length) || length < MIN_PASSWORD_LENGTH || length > MAX_PASSWORD_LENGTH) {
|
|
314
|
+
throw new Error(`Length must be between ${MIN_PASSWORD_LENGTH} and ${MAX_PASSWORD_LENGTH}`);
|
|
315
|
+
}
|
|
316
|
+
let charset = '';
|
|
317
|
+
if (uppercase)
|
|
318
|
+
charset += UPPER;
|
|
319
|
+
if (lowercase)
|
|
320
|
+
charset += LOWER;
|
|
321
|
+
if (digits)
|
|
322
|
+
charset += DIGITS;
|
|
323
|
+
if (symbols)
|
|
324
|
+
charset += SYMBOLS;
|
|
325
|
+
if (exclude) {
|
|
326
|
+
for (const char of exclude) {
|
|
327
|
+
charset = charset.replaceAll(char, '');
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (charset.length === 0) {
|
|
331
|
+
throw new Error('At least one character set must be enabled');
|
|
332
|
+
}
|
|
333
|
+
const entropy = Math.log2(Math.pow(charset.length, length));
|
|
334
|
+
const passwords = Array.from({ length: count }, () => generateRandom(length, charset));
|
|
335
|
+
return {
|
|
336
|
+
passwords,
|
|
337
|
+
type: 'random',
|
|
338
|
+
length,
|
|
339
|
+
strength: computeStrength(entropy),
|
|
340
|
+
entropy: Math.round(entropy * 10) / 10,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../../src/modules/v4/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAElG,MAAM,KAAK,GAAG,4BAA4B,CAAC;AAC3C,MAAM,KAAK,GAAG,4BAA4B,CAAC;AAC3C,MAAM,MAAM,GAAG,YAAY,CAAC;AAC5B,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAE7C,MAAM,QAAQ,GAAG;IACb,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO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C;QAChF,MAAM,IAAI,KAAK,CAAC,0BAA0B,mBAAmB,QAAQ,mBAAmB,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS;QAAE,OAAO,IAAI,KAAK,CAAC;IAChC,IAAI,SAAS;QAAE,OAAO,IAAI,KAAK,CAAC;IAChC,IAAI,MAAM;QAAE,OAAO,IAAI,MAAM,CAAC;IAC9B,IAAI,OAAO;QAAE,OAAO,IAAI,OAAO,CAAC;IAEhC,IAAI,OAAO,EAAE,CAAC;QACV,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YACzB,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvF,OAAO;QACH,SAAS;QACT,IAAI,EAAE,QAAQ;QACd,MAAM;QACN,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC;QAClC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE;KACzC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { random, randomNumber } from '../../utils/helpers.js';
|
|
2
|
+
import addressFn from './address.js';
|
|
3
|
+
import creditFn from './credit.js';
|
|
4
|
+
/**
|
|
5
|
+
* Generates a fictional personal profile with realistic demographic and contact data.
|
|
6
|
+
*
|
|
7
|
+
* @returns Object containing name, email, phone, address, job, hobbies, and other personal attributes
|
|
8
|
+
*/
|
|
9
|
+
export default function personal() {
|
|
10
|
+
const people = [
|
|
11
|
+
{ name: 'John Doe', social: 'john_doe', email: 'john@example.com', country: 'US' },
|
|
12
|
+
{ name: 'Jane Martin', social: 'jane_martin', email: 'jane@example.com', country: 'FR' },
|
|
13
|
+
{ name: 'Michael Johnson', social: 'mike_johnson', email: 'michael@example.com', country: 'UK' },
|
|
14
|
+
{ name: 'Emily Davis', social: 'emily_davis', email: 'emily@example.com', country: 'ES' },
|
|
15
|
+
{ name: 'Alexis Barbos', social: 'alexis_barbos', email: 'alexis@example.com', country: 'DE' },
|
|
16
|
+
{ name: 'Sarah Williams', social: 'sarah_williams', email: 'sarah@example.com', country: 'IT' },
|
|
17
|
+
{ name: 'Daniel Brown', social: 'daniel_brown', email: 'daniel@example.com', country: 'JP' },
|
|
18
|
+
{ name: 'Sophia Wilson', social: 'sophia_wilson', email: 'sophia@example.com', country: 'BR' },
|
|
19
|
+
{ name: 'James Taylor', social: 'james_taylor', email: 'james@example.com', country: 'CA' },
|
|
20
|
+
{ name: 'Olivia Thomas', social: 'olivia_thomas', email: 'olivia@example.com', country: 'AU' },
|
|
21
|
+
];
|
|
22
|
+
const countries = {
|
|
23
|
+
US: { tel: '123-456-7890', code: '1', lang: 'English' },
|
|
24
|
+
FR: { tel: '06 78 90 12 34', code: '33', lang: 'French' },
|
|
25
|
+
UK: { tel: '7911 123456', code: '44', lang: 'English' },
|
|
26
|
+
ES: { tel: '678 901 234', code: '34', lang: 'Spanish' },
|
|
27
|
+
DE: { tel: '163 555 1584', code: '49', lang: 'German' },
|
|
28
|
+
IT: { tel: '345 678 9012', code: '39', lang: 'Italian' },
|
|
29
|
+
JP: { tel: '080-1234-5678', code: '81', lang: 'Japanese' },
|
|
30
|
+
BR: { tel: '(11) 98765-4321', code: '55', lang: 'Portuguese' },
|
|
31
|
+
CA: { tel: '416-123-4567', code: '1', lang: 'English' },
|
|
32
|
+
AU: { tel: '0412 345 678', code: '61', lang: 'English' },
|
|
33
|
+
};
|
|
34
|
+
const jobs = ['Writer', 'Artist', 'Musician', 'Explorer', 'Scientist', 'Engineer', 'Athlete', 'Doctor'];
|
|
35
|
+
const hobbies = ['Reading', 'Traveling', 'Gaming', 'Cooking', 'Fitness', 'Music', 'Photography', 'Writing'];
|
|
36
|
+
const { cards: [generatedCard], } = creditFn(undefined, 1, 'full');
|
|
37
|
+
const card = generatedCard.formatted;
|
|
38
|
+
const cvc = generatedCard.cvv;
|
|
39
|
+
const expiration = generatedCard.expiry;
|
|
40
|
+
const person = random(people);
|
|
41
|
+
const social = person.social;
|
|
42
|
+
const country = person.country;
|
|
43
|
+
const countryCodes = { US: 'us', FR: 'fr', UK: 'uk', ES: 'es', DE: 'de' };
|
|
44
|
+
const addrCountry = countryCodes[country] ?? 'us';
|
|
45
|
+
const countryInfo = countries[country];
|
|
46
|
+
const phone = countryInfo.tel;
|
|
47
|
+
const lang = countryInfo.lang;
|
|
48
|
+
const age = randomNumber(18, 67);
|
|
49
|
+
const birthday = new Date(Date.now() - randomNumber(18, 67) * 365.25 * 24 * 60 * 60 * 1000).toISOString();
|
|
50
|
+
const emergencyContacts = [];
|
|
51
|
+
const yearIncome = randomNumber(20000, 100000);
|
|
52
|
+
const subscriptions = [];
|
|
53
|
+
const pets = [];
|
|
54
|
+
const vehicles = [];
|
|
55
|
+
let civilStatus = 'Single';
|
|
56
|
+
let children = 0;
|
|
57
|
+
if (age >= 21 && Math.random() > 0.7)
|
|
58
|
+
civilStatus = 'Married';
|
|
59
|
+
if (civilStatus === 'Married' && age >= 25)
|
|
60
|
+
children = randomNumber(0, 3);
|
|
61
|
+
while (emergencyContacts.length < randomNumber(1, 3)) {
|
|
62
|
+
let emergencyContact = random(people);
|
|
63
|
+
while (emergencyContact.email === person.email ||
|
|
64
|
+
emergencyContacts.some((e) => e.name === emergencyContact.name)) {
|
|
65
|
+
emergencyContact = random(people);
|
|
66
|
+
}
|
|
67
|
+
const emergencyPhone = `${randomNumber(100, 999)}-${randomNumber(100, 999)}-${randomNumber(1000, 9999)}`;
|
|
68
|
+
emergencyContacts.push({
|
|
69
|
+
name: emergencyContact.name,
|
|
70
|
+
relationship: random(['Spouse', 'Parent', 'Sibling', 'Friend']),
|
|
71
|
+
phone: `+${countryInfo.code} ${emergencyPhone}`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
while (subscriptions.length < randomNumber(1, 3)) {
|
|
75
|
+
const subscription = random(['Netflix', 'Spotify', 'Amazon Prime', 'Disney+', 'Hulu']);
|
|
76
|
+
if (!subscriptions.includes(subscription))
|
|
77
|
+
subscriptions.push(subscription);
|
|
78
|
+
}
|
|
79
|
+
while (pets.length < randomNumber(1, 3)) {
|
|
80
|
+
const pet = random(['Dog', 'Cat', 'Fish', 'Bird', 'None']);
|
|
81
|
+
if (!pets.includes(pet))
|
|
82
|
+
pets.push(pet);
|
|
83
|
+
}
|
|
84
|
+
while (vehicles.length < randomNumber(1, 3)) {
|
|
85
|
+
const vehicle = random(['Car', 'Bike', 'Motorcycle', 'Bus', 'None']);
|
|
86
|
+
if (!vehicles.includes(vehicle))
|
|
87
|
+
vehicles.push(vehicle);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
name: person.name,
|
|
91
|
+
email: person.email,
|
|
92
|
+
localisation: country,
|
|
93
|
+
phone: `+${countryInfo.code} ${phone}`,
|
|
94
|
+
job: random(jobs),
|
|
95
|
+
hobbies: random(hobbies),
|
|
96
|
+
language: lang,
|
|
97
|
+
card,
|
|
98
|
+
cvc,
|
|
99
|
+
expiration,
|
|
100
|
+
address: addressFn(addrCountry).addresses[0],
|
|
101
|
+
birthday,
|
|
102
|
+
civil_status: civilStatus,
|
|
103
|
+
children,
|
|
104
|
+
vehicle: vehicles,
|
|
105
|
+
social_profiles: {
|
|
106
|
+
twitter: `@${social}`,
|
|
107
|
+
facebook: `facebook.com/${social}`,
|
|
108
|
+
linkedin: `linkedin.com/in/${social}`,
|
|
109
|
+
instagram: `instagram.com/${social}`,
|
|
110
|
+
},
|
|
111
|
+
year_income: `${yearIncome} USD/year`,
|
|
112
|
+
month_income: `${(yearIncome / 12).toFixed(2)} USD/month`,
|
|
113
|
+
education: random(['High School', "Bachelor's", "Master's", 'PhD']),
|
|
114
|
+
work_experience: `${randomNumber(0, 20)} years`,
|
|
115
|
+
health_status: random(['Healthy', 'Minor Issues', 'Chronic Conditions']),
|
|
116
|
+
emergency_contacts: emergencyContacts,
|
|
117
|
+
subscriptions,
|
|
118
|
+
pets,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=personal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal.js","sourceRoot":"","sources":["../../../src/modules/v4/personal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,QAAQ,MAAM,aAAa,CAAC;AAenC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ;IAC5B,MAAM,MAAM,GAAa;QACrB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE;QAClF,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE;QACxF,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE;QAChG,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAA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