atg-atgse 1.9.8 → 2.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.
@@ -1,17 +1,18 @@
1
1
  /**
2
- * Converts Celsius to Fahrenheit.
3
- * @param {number} celsius - Temperature in Celsius.
4
- * @returns {number} - Temperature in Fahrenheit.
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 celsiusToFahrenheit: (celsius: number) => number;
7
+ export declare const formatName: (first: string, last: string) => string;
7
8
  /**
8
- * Converts Fahrenheit to Celsius.
9
- * @param {number} fahrenheit - Temperature in Fahrenheit.
10
- * @returns {number} - Temperature in Celsius.
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 fahrenheitToCelsius: (fahrenheit: number) => number;
13
+ export declare const capitalize: (str: string) => string;
13
14
  declare const _default: {
14
- celsiusToFahrenheit: (celsius: number) => number;
15
- fahrenheitToCelsius: (fahrenheit: number) => number;
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
- * Converts Celsius to Fahrenheit.
3
- * @param {number} celsius - Temperature in Celsius.
4
- * @returns {number} - Temperature in Fahrenheit.
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 celsiusToFahrenheit = (celsius) => {
7
- return (celsius * 9 / 5) + 32;
7
+ export const formatName = (first, last) => {
8
+ console.log("Formatted name");
9
+ return `${last.toUpperCase()}, ${first}`;
8
10
  };
9
11
  /**
10
- * Converts Fahrenheit to Celsius.
11
- * @param {number} fahrenheit - Temperature in Fahrenheit.
12
- * @returns {number} - Temperature in Celsius.
12
+ * Capitalizes the first letter of a string.
13
+ * @param {string} str - Input string.
14
+ * @returns {string} - Capitalized string.
13
15
  */
14
- export const fahrenheitToCelsius = (fahrenheit) => {
15
- return (fahrenheit - 32) * 5 / 9;
16
+ export const capitalize = (str) => {
17
+ if (!str)
18
+ return str;
19
+ return str.charAt(0).toUpperCase() + str.slice(1);
16
20
  };
17
- //pap-client
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
- celsiusToFahrenheit: (celsius: number) => number;
4
- fahrenheitToCelsius: (fahrenheit: number) => number;
3
+ formatName: (first: string, last: string) => string;
4
+ capitalize: (str: string) => string;
5
5
  };
6
6
  logger: {
7
7
  logWithTime: (message: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atg-atgse",
3
- "version": "1.9.8",
3
+ "version": "2.9.8",
4
4
  "description": "this package is used for pap-client with pingnal",
5
5
  "license": "ISC",
6
6
  "author": "atgatgse",