atg-atgse 1.9.8 → 3.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formatter.d.ts +11 -10
- package/dist/formatter.js +15 -12
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/formatter.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {
|
|
4
|
-
* @
|
|
2
|
+
* Formats a user name.
|
|
3
|
+
* @param {string} first - First name.
|
|
4
|
+
* @param {string} last - Last name.
|
|
5
|
+
* @returns {string} - Formatted full name.
|
|
5
6
|
*/
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const formatName: (first: string, last: string) => string;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {
|
|
10
|
-
* @returns {
|
|
9
|
+
* Capitalizes the first letter of a string.
|
|
10
|
+
* @param {string} str - Input string.
|
|
11
|
+
* @returns {string} - Capitalized string.
|
|
11
12
|
*/
|
|
12
|
-
export declare const
|
|
13
|
+
export declare const capitalize: (str: string) => string;
|
|
13
14
|
declare const _default: {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
formatName: (first: string, last: string) => string;
|
|
16
|
+
capitalize: (str: string) => string;
|
|
16
17
|
};
|
|
17
18
|
export default _default;
|
package/dist/formatter.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {
|
|
4
|
-
* @
|
|
2
|
+
* Formats a user name.
|
|
3
|
+
* @param {string} first - First name.
|
|
4
|
+
* @param {string} last - Last name.
|
|
5
|
+
* @returns {string} - Formatted full name.
|
|
5
6
|
*/
|
|
6
|
-
export const
|
|
7
|
-
|
|
7
|
+
export const formatName = (first, last) => {
|
|
8
|
+
console.log("Formatted name: ");
|
|
9
|
+
return `${last.toUpperCase()}, ${first}`;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {
|
|
12
|
-
* @returns {
|
|
12
|
+
* Capitalizes the first letter of a string.
|
|
13
|
+
* @param {string} str - Input string.
|
|
14
|
+
* @returns {string} - Capitalized string.
|
|
13
15
|
*/
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
+
export const capitalize = (str) => {
|
|
17
|
+
if (!str)
|
|
18
|
+
return str;
|
|
19
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
16
20
|
};
|
|
17
|
-
|
|
18
|
-
export default { celsiusToFahrenheit, fahrenheitToCelsius };
|
|
21
|
+
export default { formatName, capitalize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
formatter: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
formatName: (first: string, last: string) => string;
|
|
4
|
+
capitalize: (str: string) => string;
|
|
5
5
|
};
|
|
6
6
|
logger: {
|
|
7
7
|
logWithTime: (message: string) => void;
|