@creejs/commons-lang 2.1.30 → 2.1.32

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.30",
3
+ "version": "2.1.32",
4
4
  "description": "Commons Utils About Language, used inside creejs",
5
5
  "keywords": [
6
6
  "commons",
package/types/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare namespace _default {
17
17
  export { ArrayBufferUtils };
18
18
  export { TimeUtils };
19
19
  export { ArrayUtils };
20
+ export { IteratorUtils };
20
21
  }
21
22
  export default _default;
22
23
  import _Error from './_error.js';
@@ -34,4 +35,5 @@ import TypedArrayUtils from './typed-array-utils.js';
34
35
  import ArrayBufferUtils from './array-buffer-utils.js';
35
36
  import TimeUtils from './time-utils.js';
36
37
  import ArrayUtils from './array-utils.js';
37
- export { _Error, AggregatedError, LangUtils, StringUtils, TypeUtils, TypeAssert, ExecUtils, PromiseUtils, LangUtils as Lang, TypeUtils as Type, ExecUtils as Exec, ClassProxyUtils, InstanceProxyUtils, ReflectUtils, TypedArrayUtils, ArrayBufferUtils, TimeUtils, ArrayUtils };
38
+ import IteratorUtils from './iterator-utils.js';
39
+ export { _Error, AggregatedError, LangUtils, StringUtils, TypeUtils, TypeAssert, ExecUtils, PromiseUtils, LangUtils as Lang, TypeUtils as Type, ExecUtils as Exec, ClassProxyUtils, InstanceProxyUtils, ReflectUtils, TypedArrayUtils, ArrayBufferUtils, TimeUtils, ArrayUtils, IteratorUtils };
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ export { length };
3
+ }
4
+ export default _default;
5
+ /**
6
+ * @template T
7
+ * @param {Iterable<T>} iterable
8
+ */
9
+ export function length<T>(iterable: Iterable<T>): any;
@@ -1,3 +1,13 @@
1
+ /**
2
+ *
3
+ * @param {{[key:string]:any}} obj
4
+ * @param {string} path
5
+ * @param {any} [defaultValue]
6
+ * @returns
7
+ */
8
+ export function get(obj: {
9
+ [key: string]: any;
10
+ }, path: string, defaultValue?: any): any;
1
11
  /**
2
12
  * Gets the constructor name of a value.
3
13
  * @param {*} value - The value to check.
@@ -77,6 +87,7 @@ export function isBrowser(): boolean;
77
87
  */
78
88
  export function isNode(): boolean;
79
89
  declare namespace _default {
90
+ export { get };
80
91
  export { constructorName };
81
92
  export { defaults };
82
93
  export { extend };
@@ -31,6 +31,7 @@ declare namespace _default {
31
31
  export { assertBigUint64Array };
32
32
  export { assertTypedArray };
33
33
  export { assertArrayBuffer };
34
+ export { assertIterable };
34
35
  }
35
36
  export default _default;
36
37
  /**
@@ -258,3 +259,10 @@ export function assertTypedArray(value: any, paramName: string): void;
258
259
  * @throws {Error} Throws an error if the value is not an ArrayBuffer.
259
260
  */
260
261
  export function assertArrayBuffer(value: any, paramName?: string): void;
262
+ /**
263
+ * Asserts that the given value is Iterable
264
+ * @param {*} value - The value to check.
265
+ * @param {string} [paramName] - Optional parameter name for error message.
266
+ * @throws {Error} Throws an error if the value is not Iterable
267
+ */
268
+ export function assertIterable(value: any, paramName?: string): void;