@mtkruto/browser 0.128.0 → 0.129.0

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.
Files changed (113) hide show
  1. package/esm/0_deps.d.ts +4 -3
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +4 -3
  4. package/esm/3_types.d.ts +3 -0
  5. package/esm/3_types.d.ts.map +1 -1
  6. package/esm/3_types.js +3 -0
  7. package/esm/client/1_client_generic.d.ts +19 -1
  8. package/esm/client/1_client_generic.d.ts.map +1 -1
  9. package/esm/client/2_account_manager.d.ts +3 -0
  10. package/esm/client/2_account_manager.d.ts.map +1 -1
  11. package/esm/client/2_account_manager.js +16 -1
  12. package/esm/client/6_client.d.ts +19 -1
  13. package/esm/client/6_client.d.ts.map +1 -1
  14. package/esm/client/6_client.js +24 -0
  15. package/esm/client/6_client_dispatcher.d.ts +19 -1
  16. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  17. package/esm/client/6_client_dispatcher.js +24 -0
  18. package/esm/types/0_calling_code.d.ts +27 -0
  19. package/esm/types/0_calling_code.d.ts.map +1 -0
  20. package/esm/types/0_calling_code.js +26 -0
  21. package/esm/types/0_timezone.d.ts +31 -0
  22. package/esm/types/0_timezone.d.ts.map +1 -0
  23. package/esm/types/0_timezone.js +26 -0
  24. package/esm/types/1_chat_p.d.ts +1 -1
  25. package/esm/types/1_chat_p.d.ts.map +1 -1
  26. package/esm/types/1_chat_p.js +1 -1
  27. package/esm/types/1_country.d.ts +30 -0
  28. package/esm/types/1_country.d.ts.map +1 -0
  29. package/esm/types/1_country.js +30 -0
  30. package/esm/types/2_user.d.ts +1 -1
  31. package/esm/types/2_user.d.ts.map +1 -1
  32. package/esm/types/2_user.js +2 -2
  33. package/package.json +1 -1
  34. package/script/0_deps.d.ts +4 -3
  35. package/script/0_deps.d.ts.map +1 -1
  36. package/script/0_deps.js +13 -12
  37. package/script/3_types.d.ts +3 -0
  38. package/script/3_types.d.ts.map +1 -1
  39. package/script/3_types.js +3 -0
  40. package/script/client/1_client_generic.d.ts +19 -1
  41. package/script/client/1_client_generic.d.ts.map +1 -1
  42. package/script/client/2_account_manager.d.ts +3 -0
  43. package/script/client/2_account_manager.d.ts.map +1 -1
  44. package/script/client/2_account_manager.js +15 -0
  45. package/script/client/6_client.d.ts +19 -1
  46. package/script/client/6_client.d.ts.map +1 -1
  47. package/script/client/6_client.js +24 -0
  48. package/script/client/6_client_dispatcher.d.ts +19 -1
  49. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  50. package/script/client/6_client_dispatcher.js +24 -0
  51. package/script/types/0_calling_code.d.ts +27 -0
  52. package/script/types/0_calling_code.d.ts.map +1 -0
  53. package/script/types/0_calling_code.js +29 -0
  54. package/script/types/0_timezone.d.ts +31 -0
  55. package/script/types/0_timezone.d.ts.map +1 -0
  56. package/script/types/0_timezone.js +29 -0
  57. package/script/types/1_chat_p.d.ts +1 -1
  58. package/script/types/1_chat_p.d.ts.map +1 -1
  59. package/script/types/1_chat_p.js +1 -1
  60. package/script/types/1_country.d.ts +30 -0
  61. package/script/types/1_country.d.ts.map +1 -0
  62. package/script/types/1_country.js +33 -0
  63. package/script/types/2_user.d.ts +1 -1
  64. package/script/types/2_user.d.ts.map +1 -1
  65. package/script/types/2_user.js +2 -2
  66. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts +0 -2
  67. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/async/1.2.0/_util.js +0 -6
  69. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +0 -107
  70. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.js +0 -46
  72. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +0 -37
  73. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.js +0 -41
  75. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +0 -44
  76. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.js +0 -57
  78. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts +0 -22
  79. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/async/1.2.0/mod.js +0 -23
  81. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +0 -111
  82. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +0 -154
  84. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts +0 -155
  85. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/async/1.2.0/retry.js +0 -147
  87. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts +0 -43
  88. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +0 -1
  89. package/esm/deps/jsr.io/@std/async/1.2.0/tee.js +0 -79
  90. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts +0 -2
  91. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +0 -1
  92. package/script/deps/jsr.io/@std/async/1.2.0/_util.js +0 -9
  93. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +0 -107
  94. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +0 -1
  95. package/script/deps/jsr.io/@std/async/1.2.0/abortable.js +0 -49
  96. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +0 -37
  97. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +0 -1
  98. package/script/deps/jsr.io/@std/async/1.2.0/deadline.js +0 -44
  99. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +0 -44
  100. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +0 -1
  101. package/script/deps/jsr.io/@std/async/1.2.0/debounce.js +0 -60
  102. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts +0 -22
  103. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +0 -1
  104. package/script/deps/jsr.io/@std/async/1.2.0/mod.js +0 -39
  105. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +0 -111
  106. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +0 -1
  107. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +0 -158
  108. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts +0 -155
  109. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +0 -1
  110. package/script/deps/jsr.io/@std/async/1.2.0/retry.js +0 -152
  111. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts +0 -43
  112. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +0 -1
  113. package/script/deps/jsr.io/@std/async/1.2.0/tee.js +0 -82
@@ -1,82 +0,0 @@
1
- "use strict";
2
- // Copyright 2018-2026 the Deno authors. MIT license.
3
- // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.tee = tee;
6
- class Queue {
7
- #source;
8
- #queue;
9
- head;
10
- done;
11
- constructor(iterable) {
12
- this.#source = iterable[Symbol.asyncIterator]();
13
- this.#queue = {
14
- value: undefined,
15
- next: undefined,
16
- };
17
- this.head = this.#queue;
18
- this.done = false;
19
- }
20
- async next() {
21
- const result = await this.#source.next();
22
- if (!result.done) {
23
- const nextNode = {
24
- value: result.value,
25
- next: undefined,
26
- };
27
- this.#queue.next = nextNode;
28
- this.#queue = nextNode;
29
- }
30
- else {
31
- this.done = true;
32
- }
33
- }
34
- }
35
- /**
36
- * Branches the given async iterable into the `n` branches.
37
- *
38
- * @example Usage
39
- * ```ts
40
- * import { tee } from "@std/async/tee";
41
- * import { assertEquals } from "@std/assert";
42
- *
43
- * const gen = async function* gen() {
44
- * yield 1;
45
- * yield 2;
46
- * yield 3;
47
- * };
48
- *
49
- * const [branch1, branch2] = tee(gen());
50
- *
51
- * const result1 = await Array.fromAsync(branch1);
52
- * assertEquals(result1, [1, 2, 3]);
53
- *
54
- * const result2 = await Array.fromAsync(branch2);
55
- * assertEquals(result2, [1, 2, 3]);
56
- * ```
57
- *
58
- * @typeParam T The type of the provided async iterable and the returned async iterables.
59
- * @typeParam N The amount of branches to tee into.
60
- * @param iterable The iterable to tee.
61
- * @param n The amount of branches to tee into.
62
- * @returns The tuple where each element is an async iterable.
63
- */
64
- function tee(iterable, n = 2) {
65
- const queue = new Queue(iterable);
66
- async function* generator() {
67
- let buffer = queue.head;
68
- while (true) {
69
- if (buffer.next) {
70
- buffer = buffer.next;
71
- yield buffer.value;
72
- }
73
- else if (queue.done) {
74
- return;
75
- }
76
- else {
77
- await queue.next();
78
- }
79
- }
80
- }
81
- return Array.from({ length: n }).map(() => generator());
82
- }