inqjs 1.0.0 → 1.0.2

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 (182) hide show
  1. package/README.md +4 -0
  2. package/dist/Query.d.ts +31 -0
  3. package/dist/Query.d.ts.map +1 -0
  4. package/dist/{src/Query.js → Query.js} +35 -0
  5. package/dist/Query.js.map +1 -0
  6. package/dist/async/AsyncQuery.d.ts +28 -0
  7. package/dist/async/AsyncQuery.d.ts.map +1 -0
  8. package/dist/{src/async → async}/AsyncQuery.js +31 -0
  9. package/dist/async/AsyncQuery.js.map +1 -0
  10. package/dist/async/operators/allAsync.d.ts +2 -0
  11. package/dist/async/operators/allAsync.d.ts.map +1 -0
  12. package/dist/{src/async → async}/operators/allAsync.js +1 -0
  13. package/dist/async/operators/allAsync.js.map +1 -0
  14. package/dist/async/operators/anyAsync.d.ts +2 -0
  15. package/dist/async/operators/anyAsync.d.ts.map +1 -0
  16. package/dist/{src/async → async}/operators/anyAsync.js +1 -0
  17. package/dist/async/operators/anyAsync.js.map +1 -0
  18. package/dist/async/operators/appendAsync.d.ts +2 -0
  19. package/dist/async/operators/appendAsync.d.ts.map +1 -0
  20. package/dist/async/operators/appendAsync.js +8 -0
  21. package/dist/async/operators/appendAsync.js.map +1 -0
  22. package/dist/async/operators/concatAsync.d.ts +2 -0
  23. package/dist/async/operators/concatAsync.d.ts.map +1 -0
  24. package/dist/async/operators/concatAsync.js +8 -0
  25. package/dist/async/operators/concatAsync.js.map +1 -0
  26. package/dist/async/operators/countAsync.d.ts +2 -0
  27. package/dist/async/operators/countAsync.d.ts.map +1 -0
  28. package/dist/{src/async → async}/operators/countAsync.js +1 -0
  29. package/dist/async/operators/countAsync.js.map +1 -0
  30. package/dist/async/operators/distinctAsync.d.ts +2 -0
  31. package/dist/async/operators/distinctAsync.d.ts.map +1 -0
  32. package/dist/{src/async → async}/operators/distinctAsync.js +1 -0
  33. package/dist/async/operators/distinctAsync.js.map +1 -0
  34. package/dist/async/operators/exceptAsync.d.ts +2 -0
  35. package/dist/async/operators/exceptAsync.d.ts.map +1 -0
  36. package/dist/async/operators/exceptAsync.js +18 -0
  37. package/dist/async/operators/exceptAsync.js.map +1 -0
  38. package/dist/async/operators/firstAsync.d.ts +2 -0
  39. package/dist/async/operators/firstAsync.d.ts.map +1 -0
  40. package/dist/{src/async → async}/operators/firstAsync.js +1 -0
  41. package/dist/async/operators/firstAsync.js.map +1 -0
  42. package/dist/async/operators/intersectAsync.d.ts +2 -0
  43. package/dist/async/operators/intersectAsync.d.ts.map +1 -0
  44. package/dist/async/operators/intersectAsync.js +18 -0
  45. package/dist/async/operators/intersectAsync.js.map +1 -0
  46. package/dist/async/operators/maxAsync.d.ts +2 -0
  47. package/dist/async/operators/maxAsync.d.ts.map +1 -0
  48. package/dist/{src/async → async}/operators/maxAsync.js +1 -0
  49. package/dist/async/operators/maxAsync.js.map +1 -0
  50. package/dist/async/operators/minAsync.d.ts +2 -0
  51. package/dist/async/operators/minAsync.d.ts.map +1 -0
  52. package/dist/{src/async → async}/operators/minAsync.js +1 -0
  53. package/dist/async/operators/minAsync.js.map +1 -0
  54. package/dist/async/operators/orderByAsync.d.ts +2 -0
  55. package/dist/async/operators/orderByAsync.d.ts.map +1 -0
  56. package/dist/{src/async → async}/operators/orderByAsync.js +1 -0
  57. package/dist/async/operators/orderByAsync.js.map +1 -0
  58. package/dist/async/operators/prependAsync.d.ts +2 -0
  59. package/dist/async/operators/prependAsync.d.ts.map +1 -0
  60. package/dist/async/operators/prependAsync.js +8 -0
  61. package/dist/async/operators/prependAsync.js.map +1 -0
  62. package/dist/async/operators/selectAsync.d.ts +2 -0
  63. package/dist/async/operators/selectAsync.d.ts.map +1 -0
  64. package/dist/{src/async → async}/operators/selectAsync.js +1 -0
  65. package/dist/async/operators/selectAsync.js.map +1 -0
  66. package/dist/async/operators/skipAsync.d.ts +2 -0
  67. package/dist/async/operators/skipAsync.d.ts.map +1 -0
  68. package/dist/{src/async → async}/operators/skipAsync.js +1 -0
  69. package/dist/async/operators/skipAsync.js.map +1 -0
  70. package/dist/async/operators/sumAsync.d.ts +2 -0
  71. package/dist/async/operators/sumAsync.d.ts.map +1 -0
  72. package/dist/{src/async → async}/operators/sumAsync.js +1 -0
  73. package/dist/async/operators/sumAsync.js.map +1 -0
  74. package/dist/async/operators/takeAsync.d.ts +2 -0
  75. package/dist/async/operators/takeAsync.d.ts.map +1 -0
  76. package/dist/{src/async → async}/operators/takeAsync.js +1 -0
  77. package/dist/async/operators/takeAsync.js.map +1 -0
  78. package/dist/async/operators/toArrayAsync.d.ts +2 -0
  79. package/dist/async/operators/toArrayAsync.d.ts.map +1 -0
  80. package/dist/{src/async → async}/operators/toArrayAsync.js +1 -0
  81. package/dist/async/operators/toArrayAsync.js.map +1 -0
  82. package/dist/async/operators/unionAsync.d.ts +2 -0
  83. package/dist/async/operators/unionAsync.d.ts.map +1 -0
  84. package/dist/async/operators/unionAsync.js +21 -0
  85. package/dist/async/operators/unionAsync.js.map +1 -0
  86. package/dist/async/operators/whereAsync.d.ts +2 -0
  87. package/dist/async/operators/whereAsync.d.ts.map +1 -0
  88. package/dist/{src/async → async}/operators/whereAsync.js +1 -0
  89. package/dist/async/operators/whereAsync.js.map +1 -0
  90. package/dist/json/fromJson.d.ts +20 -0
  91. package/dist/json/fromJson.d.ts.map +1 -0
  92. package/dist/{src/json → json}/fromJson.js +1 -0
  93. package/dist/json/fromJson.js.map +1 -0
  94. package/dist/operators/all.d.ts +2 -0
  95. package/dist/operators/all.d.ts.map +1 -0
  96. package/dist/{src/operators → operators}/all.js +1 -0
  97. package/dist/operators/all.js.map +1 -0
  98. package/dist/operators/any.d.ts +2 -0
  99. package/dist/operators/any.d.ts.map +1 -0
  100. package/dist/{src/operators → operators}/any.js +1 -0
  101. package/dist/operators/any.js.map +1 -0
  102. package/dist/operators/append.d.ts +2 -0
  103. package/dist/operators/append.d.ts.map +1 -0
  104. package/dist/operators/append.js +8 -0
  105. package/dist/operators/append.js.map +1 -0
  106. package/dist/operators/concat.d.ts +2 -0
  107. package/dist/operators/concat.d.ts.map +1 -0
  108. package/dist/operators/concat.js +8 -0
  109. package/dist/operators/concat.js.map +1 -0
  110. package/dist/operators/count.d.ts +2 -0
  111. package/dist/operators/count.d.ts.map +1 -0
  112. package/dist/{src/operators → operators}/count.js +1 -0
  113. package/dist/operators/count.js.map +1 -0
  114. package/dist/operators/distinct.d.ts +2 -0
  115. package/dist/operators/distinct.d.ts.map +1 -0
  116. package/dist/{src/operators → operators}/distinct.js +1 -0
  117. package/dist/operators/distinct.js.map +1 -0
  118. package/dist/operators/except.d.ts +2 -0
  119. package/dist/operators/except.d.ts.map +1 -0
  120. package/dist/operators/except.js +18 -0
  121. package/dist/operators/except.js.map +1 -0
  122. package/dist/operators/first.d.ts +2 -0
  123. package/dist/operators/first.d.ts.map +1 -0
  124. package/dist/{src/operators → operators}/first.js +1 -0
  125. package/dist/operators/first.js.map +1 -0
  126. package/dist/operators/intersect.d.ts +2 -0
  127. package/dist/operators/intersect.d.ts.map +1 -0
  128. package/dist/operators/intersect.js +18 -0
  129. package/dist/operators/intersect.js.map +1 -0
  130. package/dist/operators/max.d.ts +2 -0
  131. package/dist/operators/max.d.ts.map +1 -0
  132. package/dist/{src/operators → operators}/max.js +1 -0
  133. package/dist/operators/max.js.map +1 -0
  134. package/dist/operators/min.d.ts +2 -0
  135. package/dist/operators/min.d.ts.map +1 -0
  136. package/dist/{src/operators → operators}/min.js +1 -0
  137. package/dist/operators/min.js.map +1 -0
  138. package/dist/operators/orderBy.d.ts +2 -0
  139. package/dist/operators/orderBy.d.ts.map +1 -0
  140. package/dist/{src/operators → operators}/orderBy.js +1 -0
  141. package/dist/operators/orderBy.js.map +1 -0
  142. package/dist/operators/prepend.d.ts +2 -0
  143. package/dist/operators/prepend.d.ts.map +1 -0
  144. package/dist/operators/prepend.js +8 -0
  145. package/dist/operators/prepend.js.map +1 -0
  146. package/dist/operators/select.d.ts +2 -0
  147. package/dist/operators/select.d.ts.map +1 -0
  148. package/dist/{src/operators → operators}/select.js +1 -0
  149. package/dist/operators/select.js.map +1 -0
  150. package/dist/operators/skip.d.ts +2 -0
  151. package/dist/operators/skip.d.ts.map +1 -0
  152. package/dist/{src/operators → operators}/skip.js +1 -0
  153. package/dist/operators/skip.js.map +1 -0
  154. package/dist/operators/sum.d.ts +2 -0
  155. package/dist/operators/sum.d.ts.map +1 -0
  156. package/dist/{src/operators → operators}/sum.js +1 -0
  157. package/dist/operators/sum.js.map +1 -0
  158. package/dist/operators/take.d.ts +2 -0
  159. package/dist/operators/take.d.ts.map +1 -0
  160. package/dist/{src/operators → operators}/take.js +1 -0
  161. package/dist/operators/take.js.map +1 -0
  162. package/dist/operators/toArray.d.ts +2 -0
  163. package/dist/operators/toArray.d.ts.map +1 -0
  164. package/dist/{src/operators → operators}/toArray.js +1 -0
  165. package/dist/operators/toArray.js.map +1 -0
  166. package/dist/operators/union.d.ts +2 -0
  167. package/dist/operators/union.d.ts.map +1 -0
  168. package/dist/operators/union.js +21 -0
  169. package/dist/operators/union.js.map +1 -0
  170. package/dist/operators/where.d.ts +2 -0
  171. package/dist/operators/where.d.ts.map +1 -0
  172. package/dist/{src/operators → operators}/where.js +1 -0
  173. package/dist/operators/where.js.map +1 -0
  174. package/dist/utils/comparers.d.ts +3 -0
  175. package/dist/utils/comparers.d.ts.map +1 -0
  176. package/dist/{src/utils → utils}/comparers.js +1 -0
  177. package/dist/utils/comparers.js.map +1 -0
  178. package/dist/utils/guards.d.ts +7 -0
  179. package/dist/utils/guards.d.ts.map +1 -0
  180. package/dist/{src/utils → utils}/guards.js +1 -0
  181. package/dist/utils/guards.js.map +1 -0
  182. package/package.json +4 -4
@@ -0,0 +1,2 @@
1
+ export declare function unionAsync<T, TKey = T>(source: AsyncIterable<T>, other: AsyncIterable<T>, keySelector?: (item: T) => TKey | Promise<TKey>): AsyncIterable<T>;
2
+ //# sourceMappingURL=unionAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unionAsync.d.ts","sourceRoot":"","sources":["../../../src/async/operators/unionAsync.ts"],"names":[],"mappings":"AAAA,wBAAuB,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EACzC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAwB,GACtE,aAAa,CAAC,CAAC,CAAC,CAkBlB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unionAsync = unionAsync;
4
+ async function* unionAsync(source, other, keySelector = ((x) => x)) {
5
+ const seen = new Set();
6
+ for await (const item of source) {
7
+ const key = await keySelector(item);
8
+ if (!seen.has(key)) {
9
+ seen.add(key);
10
+ yield item;
11
+ }
12
+ }
13
+ for await (const item of other) {
14
+ const key = await keySelector(item);
15
+ if (!seen.has(key)) {
16
+ seen.add(key);
17
+ yield item;
18
+ }
19
+ }
20
+ }
21
+ //# sourceMappingURL=unionAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unionAsync.js","sourceRoot":"","sources":["../../../src/async/operators/unionAsync.ts"],"names":[],"mappings":";;AAAA,gCAsBC;AAtBM,KAAK,SAAS,CAAC,CAAC,UAAU,CAC7B,MAAwB,EACxB,KAAuB,EACvB,cAAiD,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,CAAQ;IAErE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAQ,CAAC;IAE7B,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;IAED,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC7B,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function whereAsync<T>(source: AsyncIterable<T>, predicate: (item: T, index: number) => boolean | Promise<boolean>): AsyncIterable<T>;
2
+ //# sourceMappingURL=whereAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whereAsync.d.ts","sourceRoot":"","sources":["../../../src/async/operators/whereAsync.ts"],"names":[],"mappings":"AAAA,wBAAuB,UAAU,CAAC,CAAC,EAC/B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAClE,aAAa,CAAC,CAAC,CAAC,CAOlB"}
@@ -9,3 +9,4 @@ async function* whereAsync(source, predicate) {
9
9
  }
10
10
  }
11
11
  }
12
+ //# sourceMappingURL=whereAsync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whereAsync.js","sourceRoot":"","sources":["../../../src/async/operators/whereAsync.ts"],"names":[],"mappings":";;AAAA,gCAUC;AAVM,KAAK,SAAS,CAAC,CAAC,UAAU,CAC7B,MAAwB,EACxB,SAAiE;IAEjE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC9B,IAAI,MAAM,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Query } from '../Query';
2
+ /**
3
+ * Parse a JSON string and return a Query over the result.
4
+ * - If the JSON is an array, returns a Query over the array elements.
5
+ * - If the JSON is an object, returns a Query over the object's entries as [key, value] tuples.
6
+ * - For primitive values, wraps them in a single-element array.
7
+ */
8
+ export declare function fromJson<T = any>(jsonString: string): Query<T>;
9
+ /**
10
+ * Parse a JSON string as an array and return a Query over its elements.
11
+ * Throws if the JSON is not an array.
12
+ */
13
+ export declare function fromJsonArray<T = any>(jsonString: string): Query<T>;
14
+ /**
15
+ * Parse a JSON string as an object and return a Query over its entries.
16
+ * Each entry is a [key, value] tuple.
17
+ * Throws if the JSON is not an object.
18
+ */
19
+ export declare function fromJsonObject<T = any>(jsonString: string): Query<[string, T]>;
20
+ //# sourceMappingURL=fromJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromJson.d.ts","sourceRoot":"","sources":["../../src/json/fromJson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAW9D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAQnE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAQ9E"}
@@ -46,3 +46,4 @@ function fromJsonObject(jsonString) {
46
46
  }
47
47
  return Query_1.Query.from(Object.entries(parsed));
48
48
  }
49
+ //# sourceMappingURL=fromJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromJson.js","sourceRoot":"","sources":["../../src/json/fromJson.ts"],"names":[],"mappings":";;AAQA,4BAWC;AAMD,sCAQC;AAOD,wCAQC;AAhDD,oCAAiC;AAEjC;;;;;GAKG;AACH,SAAgB,QAAQ,CAAU,UAAkB;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACxB,OAAO,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;SAAM,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACvD,OAAO,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAwB,CAAC;IACrE,CAAC;SAAM,CAAC;QACJ,kCAAkC;QAClC,OAAO,aAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAChC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAU,UAAkB;IACrD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC,4BAA4B,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAU,UAAkB;IACtD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function all<T>(source: Iterable<T>, predicate: (item: T) => boolean): boolean;
2
+ //# sourceMappingURL=all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../src/operators/all.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAOpF"}
@@ -9,3 +9,4 @@ function all(source, predicate) {
9
9
  }
10
10
  return true;
11
11
  }
12
+ //# sourceMappingURL=all.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/operators/all.ts"],"names":[],"mappings":";;AAAA,kBAOC;AAPD,SAAgB,GAAG,CAAI,MAAmB,EAAE,SAA+B;IACvE,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function any<T>(source: Iterable<T>, predicate?: (item: T) => boolean): boolean;
2
+ //# sourceMappingURL=any.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../src/operators/any.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAarF"}
@@ -14,3 +14,4 @@ function any(source, predicate) {
14
14
  const iterator = source[Symbol.iterator]();
15
15
  return !iterator.next().done;
16
16
  }
17
+ //# sourceMappingURL=any.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.js","sourceRoot":"","sources":["../../src/operators/any.ts"],"names":[],"mappings":";;AAAA,kBAaC;AAbD,SAAgB,GAAG,CAAI,MAAmB,EAAE,SAAgC;IACxE,IAAI,SAAS,EAAE,CAAC;QACZ,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;YACxB,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,oDAAoD;IACpD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function append<T>(source: Iterable<T>, element: T): Iterable<T>;
2
+ //# sourceMappingURL=append.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../../src/operators/append.ts"],"names":[],"mappings":"AAAA,wBAAiB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAGvE"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.append = append;
4
+ function* append(source, element) {
5
+ yield* source;
6
+ yield element;
7
+ }
8
+ //# sourceMappingURL=append.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.js","sourceRoot":"","sources":["../../src/operators/append.ts"],"names":[],"mappings":";;AAAA,wBAGC;AAHD,QAAe,CAAC,CAAC,MAAM,CAAI,MAAmB,EAAE,OAAU;IACtD,KAAK,CAAC,CAAC,MAAM,CAAC;IACd,MAAM,OAAO,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function concat<T>(source: Iterable<T>, other: Iterable<T>): Iterable<T>;
2
+ //# sourceMappingURL=concat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../src/operators/concat.ts"],"names":[],"mappings":"AAAA,wBAAiB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAG/E"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.concat = concat;
4
+ function* concat(source, other) {
5
+ yield* source;
6
+ yield* other;
7
+ }
8
+ //# sourceMappingURL=concat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat.js","sourceRoot":"","sources":["../../src/operators/concat.ts"],"names":[],"mappings":";;AAAA,wBAGC;AAHD,QAAe,CAAC,CAAC,MAAM,CAAI,MAAmB,EAAE,KAAkB;IAC9D,KAAK,CAAC,CAAC,MAAM,CAAC;IACd,KAAK,CAAC,CAAC,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function count<T>(source: Iterable<T>, predicate?: (item: T) => boolean): number;
2
+ //# sourceMappingURL=count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../src/operators/count.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,MAAM,CAQtF"}
@@ -10,3 +10,4 @@ function count(source, predicate) {
10
10
  }
11
11
  return count;
12
12
  }
13
+ //# sourceMappingURL=count.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count.js","sourceRoot":"","sources":["../../src/operators/count.ts"],"names":[],"mappings":";;AAAA,sBAQC;AARD,SAAgB,KAAK,CAAI,MAAmB,EAAE,SAAgC;IAC1E,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function distinct<T, TKey>(source: Iterable<T>, keySelector: (item: T) => TKey): Iterable<T>;
2
+ //# sourceMappingURL=distinct.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/operators/distinct.ts"],"names":[],"mappings":"AAAA,wBAAiB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CASnG"}
@@ -11,3 +11,4 @@ function* distinct(source, keySelector) {
11
11
  }
12
12
  }
13
13
  }
14
+ //# sourceMappingURL=distinct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../src/operators/distinct.ts"],"names":[],"mappings":";;AAAA,4BASC;AATD,QAAe,CAAC,CAAC,QAAQ,CAAU,MAAmB,EAAE,WAA8B;IAClF,MAAM,IAAI,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function except<T, TKey = T>(source: Iterable<T>, other: Iterable<T>, keySelector?: (item: T) => TKey): Iterable<T>;
2
+ //# sourceMappingURL=except.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"except.d.ts","sourceRoot":"","sources":["../../src/operators/except.ts"],"names":[],"mappings":"AAAA,wBAAiB,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAC/B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAA2B,GACtD,QAAQ,CAAC,CAAC,CAAC,CAcb"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.except = except;
4
+ function* except(source, other, keySelector = ((x) => x)) {
5
+ const otherKeys = new Set();
6
+ for (const item of other) {
7
+ otherKeys.add(keySelector(item));
8
+ }
9
+ const seen = new Set();
10
+ for (const item of source) {
11
+ const key = keySelector(item);
12
+ if (!otherKeys.has(key) && !seen.has(key)) {
13
+ seen.add(key);
14
+ yield item;
15
+ }
16
+ }
17
+ }
18
+ //# sourceMappingURL=except.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"except.js","sourceRoot":"","sources":["../../src/operators/except.ts"],"names":[],"mappings":";;AAAA,wBAkBC;AAlBD,QAAe,CAAC,CAAC,MAAM,CACnB,MAAmB,EACnB,KAAkB,EAClB,cAAiC,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,CAAQ;IAErD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAQ,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function first<T>(source: Iterable<T>, predicate?: (item: T) => boolean): T;
2
+ //# sourceMappingURL=first.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../src/operators/first.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,CAejF"}
@@ -18,3 +18,4 @@ function first(source, predicate) {
18
18
  }
19
19
  throw new Error('Sequence contains no matching element.');
20
20
  }
21
+ //# sourceMappingURL=first.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"first.js","sourceRoot":"","sources":["../../src/operators/first.ts"],"names":[],"mappings":";;AAAA,sBAeC;AAfD,SAAgB,KAAK,CAAI,MAAmB,EAAE,SAAgC;IAC1E,IAAI,SAAS,EAAE,CAAC;QACZ,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;YACxB,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,MAAM,CAAC,KAAK,CAAC;QACxB,CAAC;IACL,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function intersect<T, TKey = T>(source: Iterable<T>, other: Iterable<T>, keySelector?: (item: T) => TKey): Iterable<T>;
2
+ //# sourceMappingURL=intersect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intersect.d.ts","sourceRoot":"","sources":["../../src/operators/intersect.ts"],"names":[],"mappings":"AAAA,wBAAiB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAClC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAA2B,GACtD,QAAQ,CAAC,CAAC,CAAC,CAcb"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.intersect = intersect;
4
+ function* intersect(source, other, keySelector = ((x) => x)) {
5
+ const otherKeys = new Set();
6
+ for (const item of other) {
7
+ otherKeys.add(keySelector(item));
8
+ }
9
+ const seen = new Set();
10
+ for (const item of source) {
11
+ const key = keySelector(item);
12
+ if (otherKeys.has(key) && !seen.has(key)) {
13
+ seen.add(key);
14
+ yield item;
15
+ }
16
+ }
17
+ }
18
+ //# sourceMappingURL=intersect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intersect.js","sourceRoot":"","sources":["../../src/operators/intersect.ts"],"names":[],"mappings":";;AAAA,8BAkBC;AAlBD,QAAe,CAAC,CAAC,SAAS,CACtB,MAAmB,EACnB,KAAkB,EAClB,cAAiC,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,CAAQ;IAErD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAQ,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,GAAG,EAAQ,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function max<T>(source: Iterable<T>, selector: (item: T) => number): number | undefined;
2
+ //# sourceMappingURL=max.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../src/operators/max.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,CAY7F"}
@@ -14,3 +14,4 @@ function max(source, selector) {
14
14
  }
15
15
  return maxValue;
16
16
  }
17
+ //# sourceMappingURL=max.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"max.js","sourceRoot":"","sources":["../../src/operators/max.ts"],"names":[],"mappings":";;AAAA,kBAYC;AAZD,SAAgB,GAAG,CAAI,MAAmB,EAAE,QAA6B;IACrE,IAAI,QAA4B,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,QAAQ,KAAK,SAAS,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YAC7C,QAAQ,GAAG,KAAK,CAAC;QACrB,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function min<T>(source: Iterable<T>, selector: (item: T) => number): number | undefined;
2
+ //# sourceMappingURL=min.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min.d.ts","sourceRoot":"","sources":["../../src/operators/min.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,SAAS,CAY7F"}
@@ -14,3 +14,4 @@ function min(source, selector) {
14
14
  }
15
15
  return minValue;
16
16
  }
17
+ //# sourceMappingURL=min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min.js","sourceRoot":"","sources":["../../src/operators/min.ts"],"names":[],"mappings":";;AAAA,kBAYC;AAZD,SAAgB,GAAG,CAAI,MAAmB,EAAE,QAA6B;IACrE,IAAI,QAA4B,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,QAAQ,KAAK,SAAS,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YAC7C,QAAQ,GAAG,KAAK,CAAC;QACrB,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function orderBy<T, TKey>(source: Iterable<T>, keySelector: (item: T) => TKey, comparer: (a: TKey, b: TKey) => number): Iterable<T>;
2
+ //# sourceMappingURL=orderBy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orderBy.d.ts","sourceRoot":"","sources":["../../src/operators/orderBy.ts"],"names":[],"mappings":"AAAA,wBAAiB,OAAO,CAAC,CAAC,EAAE,IAAI,EAC5B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EAC9B,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,GACvC,QAAQ,CAAC,CAAC,CAAC,CAWb"}
@@ -12,3 +12,4 @@ function* orderBy(source, keySelector, comparer) {
12
12
  yield item;
13
13
  }
14
14
  }
15
+ //# sourceMappingURL=orderBy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orderBy.js","sourceRoot":"","sources":["../../src/operators/orderBy.ts"],"names":[],"mappings":";;AAAA,0BAeC;AAfD,QAAe,CAAC,CAAC,OAAO,CACpB,MAAmB,EACnB,WAA8B,EAC9B,QAAsC;IAEtC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACjB,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,IAAI,CAAC;IACf,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function prepend<T>(source: Iterable<T>, element: T): Iterable<T>;
2
+ //# sourceMappingURL=prepend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepend.d.ts","sourceRoot":"","sources":["../../src/operators/prepend.ts"],"names":[],"mappings":"AAAA,wBAAiB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAGxE"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.prepend = prepend;
4
+ function* prepend(source, element) {
5
+ yield element;
6
+ yield* source;
7
+ }
8
+ //# sourceMappingURL=prepend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepend.js","sourceRoot":"","sources":["../../src/operators/prepend.ts"],"names":[],"mappings":";;AAAA,0BAGC;AAHD,QAAe,CAAC,CAAC,OAAO,CAAI,MAAmB,EAAE,OAAU;IACvD,MAAM,OAAO,CAAC;IACd,KAAK,CAAC,CAAC,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function select<T, U>(source: Iterable<T>, selector: (item: T, index: number) => U): Iterable<U>;
2
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/operators/select.ts"],"names":[],"mappings":"AAAA,wBAAiB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAKvG"}
@@ -7,3 +7,4 @@ function* select(source, selector) {
7
7
  yield selector(item, index++);
8
8
  }
9
9
  }
10
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/operators/select.ts"],"names":[],"mappings":";;AAAA,wBAKC;AALD,QAAe,CAAC,CAAC,MAAM,CAAO,MAAmB,EAAE,QAAuC;IACtF,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAClC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function skip<T>(source: Iterable<T>, count: number): Iterable<T>;
2
+ //# sourceMappingURL=skip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip.d.ts","sourceRoot":"","sources":["../../src/operators/skip.ts"],"names":[],"mappings":"AAAA,wBAAiB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CASxE"}
@@ -11,3 +11,4 @@ function* skip(source, count) {
11
11
  yield item;
12
12
  }
13
13
  }
14
+ //# sourceMappingURL=skip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip.js","sourceRoot":"","sources":["../../src/operators/skip.ts"],"names":[],"mappings":";;AAAA,oBASC;AATD,QAAe,CAAC,CAAC,IAAI,CAAI,MAAmB,EAAE,KAAa;IACvD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,SAAS;QACb,CAAC;QACD,MAAM,IAAI,CAAC;IACf,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function sum<T>(source: Iterable<T>, selector: (item: T) => number): number;
2
+ //# sourceMappingURL=sum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sum.d.ts","sourceRoot":"","sources":["../../src/operators/sum.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAUjF"}
@@ -12,3 +12,4 @@ function sum(source, selector) {
12
12
  }
13
13
  return total;
14
14
  }
15
+ //# sourceMappingURL=sum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sum.js","sourceRoot":"","sources":["../../src/operators/sum.ts"],"names":[],"mappings":";;AAAA,kBAUC;AAVD,SAAgB,GAAG,CAAI,MAAmB,EAAE,QAA6B;IACrE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;QAC/D,CAAC;QACD,KAAK,IAAI,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function take<T>(source: Iterable<T>, count: number): Iterable<T>;
2
+ //# sourceMappingURL=take.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"take.d.ts","sourceRoot":"","sources":["../../src/operators/take.ts"],"names":[],"mappings":"AAAA,wBAAiB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAOxE"}
@@ -10,3 +10,4 @@ function* take(source, count) {
10
10
  taken++;
11
11
  }
12
12
  }
13
+ //# sourceMappingURL=take.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"take.js","sourceRoot":"","sources":["../../src/operators/take.ts"],"names":[],"mappings":";;AAAA,oBAOC;AAPD,QAAe,CAAC,CAAC,IAAI,CAAI,MAAmB,EAAE,KAAa;IACvD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,IAAI,KAAK,IAAI,KAAK;YAAE,MAAM;QAC1B,MAAM,IAAI,CAAC;QACX,KAAK,EAAE,CAAC;IACZ,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function toArray<T>(source: Iterable<T>): T[];
2
+ //# sourceMappingURL=toArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../src/operators/toArray.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAEnD"}
@@ -4,3 +4,4 @@ exports.toArray = toArray;
4
4
  function toArray(source) {
5
5
  return Array.from(source);
6
6
  }
7
+ //# sourceMappingURL=toArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../src/operators/toArray.ts"],"names":[],"mappings":";;AAAA,0BAEC;AAFD,SAAgB,OAAO,CAAI,MAAmB;IAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function union<T, TKey = T>(source: Iterable<T>, other: Iterable<T>, keySelector?: (item: T) => TKey): Iterable<T>;
2
+ //# sourceMappingURL=union.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../src/operators/union.ts"],"names":[],"mappings":"AAAA,wBAAiB,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAC9B,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAA2B,GACtD,QAAQ,CAAC,CAAC,CAAC,CAkBb"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.union = union;
4
+ function* union(source, other, keySelector = ((x) => x)) {
5
+ const seen = new Set();
6
+ for (const item of source) {
7
+ const key = keySelector(item);
8
+ if (!seen.has(key)) {
9
+ seen.add(key);
10
+ yield item;
11
+ }
12
+ }
13
+ for (const item of other) {
14
+ const key = keySelector(item);
15
+ if (!seen.has(key)) {
16
+ seen.add(key);
17
+ yield item;
18
+ }
19
+ }
20
+ }
21
+ //# sourceMappingURL=union.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"union.js","sourceRoot":"","sources":["../../src/operators/union.ts"],"names":[],"mappings":";;AAAA,sBAsBC;AAtBD,QAAe,CAAC,CAAC,KAAK,CAClB,MAAmB,EACnB,KAAkB,EAClB,cAAiC,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,CAAQ;IAErD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAQ,CAAC;IAE7B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function where<T>(source: Iterable<T>, predicate: (item: T, index: number) => boolean): Iterable<T>;
2
+ //# sourceMappingURL=where.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"where.d.ts","sourceRoot":"","sources":["../../src/operators/where.ts"],"names":[],"mappings":"AAAA,wBAAiB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAO1G"}
@@ -9,3 +9,4 @@ function* where(source, predicate) {
9
9
  }
10
10
  }
11
11
  }
12
+ //# sourceMappingURL=where.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"where.js","sourceRoot":"","sources":["../../src/operators/where.ts"],"names":[],"mappings":";;AAAA,sBAOC;AAPD,QAAe,CAAC,CAAC,KAAK,CAAI,MAAmB,EAAE,SAA8C;IACzF,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QACxB,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function defaultComparer<T>(a: T, b: T): number;
2
+ export declare function identity<T>(item: T): T;
3
+ //# sourceMappingURL=comparers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparers.d.ts","sourceRoot":"","sources":["../../src/utils/comparers.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAOrD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAEtC"}
@@ -18,3 +18,4 @@ function defaultComparer(a, b) {
18
18
  function identity(item) {
19
19
  return item;
20
20
  }
21
+ //# sourceMappingURL=comparers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparers.js","sourceRoot":"","sources":["../../src/utils/comparers.ts"],"names":[],"mappings":";;AAAA,0CAOC;AAED,4BAEC;AAXD,SAAgB,eAAe,CAAI,CAAI,EAAE,CAAI;IACzC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IAC5C,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC;IACrB,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IACpB,OAAO,CAAC,CAAC;AACb,CAAC;AAED,SAAgB,QAAQ,CAAI,IAAO;IAC/B,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare function isIterable<T>(obj: any): obj is Iterable<T>;
2
+ export declare function isFunction(obj: any): obj is Function;
3
+ export declare function assertIterable<T>(source: any, name?: string): asserts source is Iterable<T>;
4
+ export declare function assertFunction(fn: any, name: string): asserts fn is Function;
5
+ export declare function assertInteger(num: any, name: string): asserts num is number;
6
+ export declare function assertNonNegative(num: number, name: string): void;
7
+ //# sourceMappingURL=guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/utils/guards.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,CAE1D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ,CAEpD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,MAAiB,GAAG,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAIrG;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,QAAQ,CAI5E;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,MAAM,CAI3E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAIjE"}
@@ -32,3 +32,4 @@ function assertNonNegative(num, name) {
32
32
  throw new TypeError(`${name} must be non-negative.`);
33
33
  }
34
34
  }
35
+ //# sourceMappingURL=guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/utils/guards.ts"],"names":[],"mappings":";;AAAA,gCAEC;AAED,gCAEC;AAED,wCAIC;AAED,wCAIC;AAED,sCAIC;AAED,8CAIC;AA9BD,SAAgB,UAAU,CAAI,GAAQ;IAClC,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;AACrE,CAAC;AAED,SAAgB,UAAU,CAAC,GAAQ;IAC/B,OAAO,OAAO,GAAG,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,SAAgB,cAAc,CAAI,MAAW,EAAE,OAAe,QAAQ;IAClE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,uBAAuB,CAAC,CAAC;IACxD,CAAC;AACL,CAAC;AAED,SAAgB,cAAc,CAAC,EAAO,EAAE,IAAY;IAChD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;QAClB,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,sBAAsB,CAAC,CAAC;IACvD,CAAC;AACL,CAAC;AAED,SAAgB,aAAa,CAAC,GAAQ,EAAE,IAAY;IAChD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7E,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,4BAA4B,CAAC,CAAC;IAC7D,CAAC;AACL,CAAC;AAED,SAAgB,iBAAiB,CAAC,GAAW,EAAE,IAAY;IACvD,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACV,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,wBAAwB,CAAC,CAAC;IACzD,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "inqjs",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A lightweight, dependency-free LINQ engine for TypeScript and JavaScript with comprehensive query capabilities",
5
- "main": "dist/src/Query.js",
6
- "types": "dist/src/Query.d.ts",
5
+ "main": "dist/Query.js",
6
+ "types": "dist/Query.d.ts",
7
7
  "files": [
8
- "dist/src/**/*",
8
+ "dist/**/*",
9
9
  "README.md",
10
10
  "LICENSE"
11
11
  ],