@creejs/commons-lang 2.1.33 → 2.1.35

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.33",
3
+ "version": "2.1.35",
4
4
  "description": "Commons Utils About Language, used inside creejs",
5
5
  "keywords": [
6
6
  "commons",
package/types/index.d.ts CHANGED
@@ -18,6 +18,7 @@ declare namespace _default {
18
18
  export { TimeUtils };
19
19
  export { ArrayUtils };
20
20
  export { IteratorUtils };
21
+ export { IterableUtils };
21
22
  }
22
23
  export default _default;
23
24
  import _Error from './_error.js';
@@ -36,4 +37,5 @@ import ArrayBufferUtils from './array-buffer-utils.js';
36
37
  import TimeUtils from './time-utils.js';
37
38
  import ArrayUtils from './array-utils.js';
38
39
  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 };
40
+ import IterableUtils from './iterable-utils.js';
41
+ 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, IterableUtils };
@@ -0,0 +1,19 @@
1
+ declare namespace _default {
2
+ export { length };
3
+ export { take };
4
+ }
5
+ export default _default;
6
+ /**
7
+ * @template T
8
+ * @param {Iterable<T>} iterable
9
+ * @returns {number}
10
+ * @throws {Error} Not Iterable
11
+ */
12
+ export function length<T>(iterable: Iterable<T>): number;
13
+ /**
14
+ * @template T
15
+ * @param {Iterable<T>} iterable
16
+ * @param {number} howMany
17
+ * @returns {Array<T>}
18
+ */
19
+ export function take<T>(iterable: Iterable<T>, howMany: number): Array<T>;
@@ -1,11 +1,11 @@
1
1
  declare namespace _default {
2
- export { length };
2
+ export { take };
3
3
  }
4
4
  export default _default;
5
5
  /**
6
6
  * @template T
7
- * @param {Iterable<T>} iterable
8
- * @returns {number}
9
- * @throws {Error} Not Iterable
7
+ * @param {Iterator<T>} iterator
8
+ * @param {number} howMany
9
+ * @returns {Array<T>}
10
10
  */
11
- export function length<T>(iterable: Iterable<T>): number;
11
+ export function take<T>(iterator: Iterator<T>, howMany: number): Array<T>;