@arex95/vue-core 1.0.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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/composables/axios/axiosFetch.d.ts +10 -0
  4. package/dist/composables/axios/createFetch.d.ts +10 -0
  5. package/dist/composables/axios/index.d.ts +3 -0
  6. package/dist/composables/axios/useVueQuery.d.ts +192 -0
  7. package/dist/composables/breakpoints/index.d.ts +1 -0
  8. package/dist/composables/breakpoints/useBreakpoint.d.ts +62 -0
  9. package/dist/composables/filters/index.d.ts +1 -0
  10. package/dist/composables/filters/useFilter.d.ts +16 -0
  11. package/dist/composables/index.d.ts +5 -0
  12. package/dist/composables/paginators/index.d.ts +1 -0
  13. package/dist/composables/paginators/usePaginator.d.ts +14 -0
  14. package/dist/composables/sorters/index.d.ts +1 -0
  15. package/dist/composables/sorters/useSorter.d.ts +14 -0
  16. package/dist/config/axios/axiosConfig.d.ts +47 -0
  17. package/dist/config/axios/index.d.ts +2 -0
  18. package/dist/config/index.d.ts +1 -0
  19. package/dist/constants/breakpointEnum.d.ts +31 -0
  20. package/dist/constants/exceptionEnum.d.ts +30 -0
  21. package/dist/constants/fileTypesEnum.d.ts +25 -0
  22. package/dist/constants/httpEnum.d.ts +21 -0
  23. package/dist/constants/index.d.ts +6 -0
  24. package/dist/constants/keyCodeEnum.d.ts +10 -0
  25. package/dist/constants/storageEnum.d.ts +50 -0
  26. package/dist/index.d.ts +6 -0
  27. package/dist/rest/RestStd.d.ts +70 -0
  28. package/dist/rest/index.d.ts +1 -0
  29. package/dist/types/AxiosOptionsParameter.d.ts +31 -0
  30. package/dist/types/ExtendedQueryOptions.d.ts +6 -0
  31. package/dist/types/index.d.ts +2 -0
  32. package/dist/utils/browser.d.ts +30 -0
  33. package/dist/utils/dates.d.ts +71 -0
  34. package/dist/utils/debounces.d.ts +57 -0
  35. package/dist/utils/exports.d.ts +34 -0
  36. package/dist/utils/files.d.ts +46 -0
  37. package/dist/utils/index.d.ts +9 -0
  38. package/dist/utils/io.d.ts +168 -0
  39. package/dist/utils/objects.d.ts +109 -0
  40. package/dist/utils/strings.d.ts +63 -0
  41. package/dist/utils/validations.d.ts +114 -0
  42. package/dist/vue-core.cjs.js +2118 -0
  43. package/dist/vue-core.esm.js +1993 -0
  44. package/package.json +45 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Capitalizes the first character of a string.
3
+ * @param {string} s The string to capitalize.
4
+ * @returns {string} The capitalized string.
5
+ */
6
+ export declare function upperFirst(s: string): string;
7
+ /**
8
+ * Lowercases the first character of a string.
9
+ * @param {string} s The string to lowercase.
10
+ * @returns {string} The lowercased string.
11
+ */
12
+ export declare function lowerFirst(s: string): string;
13
+ /**
14
+ * Removes accents and special characters from a string and converts it to a URL-friendly format.
15
+ * @param {string} input The string to process.
16
+ * @returns {string} The processed string.
17
+ */
18
+ export declare function removeAccent(input: string): string;
19
+ /**
20
+ * Reverses a string.
21
+ * @param {string} str The string to reverse.
22
+ * @returns {string} The reversed string.
23
+ */
24
+ export declare function reverseString(str: string): string;
25
+ /**
26
+ * Counts the number of words in a string.
27
+ * @param {string} str The string to analyze.
28
+ * @returns {number} The word count.
29
+ */
30
+ export declare function countWords(str: string): number;
31
+ /**
32
+ * Truncates a string to the specified length and adds ellipsis if necessary.
33
+ * @param {string} str The string to truncate.
34
+ * @param {number} maxLength The maximum length of the string.
35
+ * @returns {string} The truncated string.
36
+ */
37
+ export declare function truncateString(str: string, maxLength: number): string;
38
+ /**
39
+ * Converts a string to camel case.
40
+ * @param {string} str The string to convert.
41
+ * @returns {string} The camel cased string.
42
+ */
43
+ export declare function toCamelCase(str: string): string;
44
+ /**
45
+ * Converts a string to kebab case.
46
+ * @param {string} str The string to convert.
47
+ * @returns {string} The kebab cased string.
48
+ */
49
+ export declare function toKebabCase(str: string): string;
50
+ /**
51
+ * Replaces all instances of a substring within a string.
52
+ * @param {string} str The original string.
53
+ * @param {string} find The substring to find.
54
+ * @param {string} replace The substring to replace with.
55
+ * @returns {string} The modified string.
56
+ */
57
+ export declare function replaceAll(str: string, find: string, replace: string): string;
58
+ /**
59
+ * Generates a random string of a specific length.
60
+ * @param {number} length The length of the string to generate.
61
+ * @returns {string} The random string.
62
+ */
63
+ export declare function generateRandomString(length: number): string;
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Validates if the key pressed is a valid letter or special character.
3
+ * @param {KeyboardEvent} e The keyboard event.
4
+ * @returns {boolean} True if the key is valid, otherwise false.
5
+ */
6
+ export declare function validateLetters(e: KeyboardEvent): boolean;
7
+ /**
8
+ * Validates if the key pressed is a valid alphanumeric character.
9
+ * @param {KeyboardEvent} e The keyboard event.
10
+ * @returns {boolean} True if the key is valid, otherwise false.
11
+ */
12
+ export declare function validateAlphanumeric(e: KeyboardEvent): boolean;
13
+ /**
14
+ * Validates if the key pressed is a number.
15
+ * @param {KeyboardEvent} e The keyboard event.
16
+ * @returns {boolean} True if the key is a number, otherwise false.
17
+ */
18
+ export declare function validateNumbers(e: KeyboardEvent): boolean;
19
+ /**
20
+ * Validates if a phone number is valid.
21
+ * @param {string} phoneNumber The phone number to validate.
22
+ * @returns {boolean} True if the phone number is valid, otherwise false.
23
+ */
24
+ export declare function isValidPhoneNumber(phoneNumber: string): boolean;
25
+ /**
26
+ * Validates if a string is a valid email address.
27
+ * @param {string} email The email address to validate.
28
+ * @returns {boolean} True if the email address is valid, otherwise false.
29
+ */
30
+ export declare function isValidEmail(email: string): boolean;
31
+ /**
32
+ * Validates if a string is a valid URL.
33
+ * @param {string} url The URL to validate.
34
+ * @returns {boolean} True if the URL is valid, otherwise false.
35
+ */
36
+ export declare function isValidURL(url: string): boolean;
37
+ /**
38
+ * Validates if a string is a valid date in YYYY-MM-DD format.
39
+ * @param {string} date The date string to validate.
40
+ * @returns {boolean} True if the date is valid, otherwise false.
41
+ */
42
+ export declare function isValidDate(date: string): boolean;
43
+ /**
44
+ * Validates if a password meets certain strength criteria.
45
+ * @param {string} password The password to validate.
46
+ * @returns {boolean} True if the password is strong, otherwise false.
47
+ */
48
+ export declare function isStrongPassword(password: string): boolean;
49
+ /**
50
+ * Validates a credit card number using the Luhn algorithm.
51
+ * @param {string} cardNumber The credit card number to validate.
52
+ * @returns {boolean} True if the credit card number is valid, otherwise false.
53
+ */
54
+ export declare function isValidCreditCard(cardNumber: string): boolean;
55
+ /**
56
+ * Validates if a string is a valid hex color code.
57
+ * @param {string} color The color code to validate.
58
+ * @returns {boolean} True if the color code is valid, otherwise false.
59
+ */
60
+ export declare function isValidHexColor(color: string): boolean;
61
+ /**
62
+ * Validates if a string is a valid time in HH:MM format.
63
+ * @param {string} time The time string to validate.
64
+ * @returns {boolean} True if the time is valid, otherwise false.
65
+ */
66
+ export declare function isValidTime(time: string): boolean;
67
+ /**
68
+ * Validates if a string is a valid IPv4 address.
69
+ * @param {string} ip The IP address to validate.
70
+ * @returns {boolean} True if the IP address is valid, otherwise false.
71
+ */
72
+ export declare function isValidIP(ip: string): boolean;
73
+ /**
74
+ * Validates if a string is a valid U.S. Social Security Number (SSN).
75
+ * @param {string} ssn The SSN to validate.
76
+ * @returns {boolean} True if the SSN is valid, otherwise false.
77
+ */
78
+ export declare function isValidSSN(ssn: string): boolean;
79
+ /**
80
+ * Validates if a string is a valid U.S. ZIP code.
81
+ * @param {string} zip The ZIP code to validate.
82
+ * @returns {boolean} True if the ZIP code is valid, otherwise false.
83
+ */
84
+ export declare function isValidZIP(zip: string): boolean;
85
+ /**
86
+ * Validates if a string is a valid credit card expiry date in MM/YY format.
87
+ * @param {string} expiryDate The expiry date to validate.
88
+ * @returns {boolean} True if the expiry date is valid, otherwise false.
89
+ */
90
+ export declare function isValidExpiryDate(expiryDate: string): boolean;
91
+ /**
92
+ * Validates if a string is a valid 8-character hexadecimal color code (including alpha).
93
+ * @param {string} color The color code to validate.
94
+ * @returns {boolean} True if the color code is valid, otherwise false.
95
+ */
96
+ export declare function isValidHexColorAlpha(color: string): boolean;
97
+ /**
98
+ * Validates if a username meets specific criteria.
99
+ * @param {string} username The username to validate.
100
+ * @returns {boolean} True if the username is valid, otherwise false.
101
+ */
102
+ export declare function isValidUsername(username: string): boolean;
103
+ /**
104
+ * Validates if a string represents a valid age between 0 and 120.
105
+ * @param {string} age The age to validate.
106
+ * @returns {boolean} True if the age is valid, otherwise false.
107
+ */
108
+ export declare function isValidAge(age: string): boolean;
109
+ /**
110
+ * Validates if a string is a valid hexadecimal number.
111
+ * @param {string} hex The hexadecimal number to validate.
112
+ * @returns {boolean} True if the number is valid, otherwise false.
113
+ */
114
+ export declare function isValidHexNumber(hex: string): boolean;