@creejs/commons-lang 2.1.24 → 2.1.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creejs/commons-lang",
3
- "version": "2.1.24",
3
+ "version": "2.1.25",
4
4
  "description": "Commons Utils About Language, used inside creejs",
5
5
  "keywords": [
6
6
  "commons",
@@ -6,17 +6,17 @@
6
6
  export function constructorName(value: any): string | undefined;
7
7
  /**
8
8
  * Assigns default values from source objects to target object for undefined properties.
9
- * @param {Object<string, any>} target - The target object to assign defaults to
10
- * @param {...Object<string, any>} sources - Source objects containing default values
11
- * @returns {Object<string, any>} The modified target object with defaults applied
12
- * @throws {TypeError} If target is null or undefined
9
+ * 1. No Deep-Copy, only first level properties are assigned.
10
+ * @param {{[key:string]:any}} target - The target object to assign defaults to
11
+ * @param {...{[key:string]:any}|undefined} sources - Source objects containing default values
12
+ * @returns {{[key:string]:any}} The modified target object with defaults applied
13
13
  */
14
14
  export function defaults(target: {
15
- [x: string]: any;
16
- }, ...sources: {
17
- [x: string]: any;
18
- }[]): {
19
- [x: string]: any;
15
+ [key: string]: any;
16
+ }, ...sources: ({
17
+ [key: string]: any;
18
+ } | undefined)[]): {
19
+ [key: string]: any;
20
20
  };
21
21
  /**
22
22
  * Extends a target object with properties from one or more source objects.
@@ -8,9 +8,11 @@ export function isEmpty(str: string): boolean;
8
8
  /**
9
9
  * Asserts that the given string is not empty.
10
10
  * @param {string} str - The string to check.
11
+ * @param {string} [paramName]
12
+ *
11
13
  * @throws {Error} Throws an error if the string is empty.
12
14
  */
13
- export function assertNotEmpty(str: string): void;
15
+ export function assertNotEmpty(str: string, paramName?: string): void;
14
16
  /**
15
17
  * Checks if a string is null, undefined, or consists only of whitespace.
16
18
  * @param {string} str - The string to check.
@@ -21,9 +23,10 @@ export function isBlank(str: string): boolean;
21
23
  /**
22
24
  * Asserts that the given string is not blank.
23
25
  * @param {string} str - The string to check.
26
+ * @param {string} [paramName]
24
27
  * @throws {Error} Throws an error if the string is blank.
25
28
  */
26
- export function assertNotBlank(str: string): void;
29
+ export function assertNotBlank(str: string, paramName?: string): void;
27
30
  /**
28
31
  * Capitalizes the first character of a string.
29
32
  * @param {string} str - The string to capitalize.