@cspell/cspell-pipe 6.26.2 → 6.27.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 (150) hide show
  1. package/dist/cjs/helpers/distribute.js +37 -0
  2. package/dist/cjs/helpers/index.js +17 -0
  3. package/dist/cjs/helpers/interleave.js +22 -0
  4. package/dist/cjs/helpers/iteratorToIterable.js +18 -0
  5. package/dist/cjs/helpers/toArray.js +21 -0
  6. package/dist/cjs/helpers/toAsyncIterable.js +19 -0
  7. package/dist/cjs/helpers/util.js +15 -0
  8. package/dist/cjs/index.js +60 -0
  9. package/dist/cjs/internalTypes.js +3 -0
  10. package/dist/cjs/operators/{append.cjs → append.js} +8 -10
  11. package/dist/cjs/operators/await.js +13 -0
  12. package/dist/cjs/operators/{combine.cjs → combine.js} +5 -4
  13. package/dist/cjs/operators/{concatMap.cjs → concatMap.js} +8 -16
  14. package/dist/cjs/operators/{filter.cjs → filter.js} +8 -10
  15. package/dist/cjs/operators/{first.cjs → first.js} +8 -10
  16. package/dist/cjs/operators/{flatten.cjs → flatten.js} +8 -16
  17. package/dist/cjs/operators/index.js +60 -0
  18. package/dist/cjs/operators/joinStrings.js +28 -0
  19. package/dist/cjs/operators/{last.cjs → last.js} +8 -10
  20. package/dist/cjs/operators/{map.cjs → map.js} +8 -16
  21. package/dist/cjs/operators/{reduce.cjs → reduce.js} +9 -20
  22. package/dist/cjs/operators/{skip.cjs → skip.js} +8 -16
  23. package/dist/cjs/operators/{take.cjs → take.js} +8 -16
  24. package/dist/cjs/operators/{tap.cjs → tap.js} +8 -16
  25. package/dist/cjs/operators/types.js +3 -0
  26. package/dist/cjs/operators/{unique.cjs → unique.js} +8 -16
  27. package/dist/cjs/pipe.js +15 -0
  28. package/dist/cjs/reduce.js +27 -0
  29. package/dist/cjs/sync/index.js +26 -0
  30. package/dist/{cjs/operators/helpers/distribute.d.ts → esm/helpers/distribute.d.mts} +1 -1
  31. package/dist/esm/helpers/distribute.mjs +33 -0
  32. package/dist/esm/helpers/index.d.mts +7 -0
  33. package/dist/esm/helpers/index.mjs +7 -0
  34. package/dist/{cjs/operators/helpers/interleave.d.ts → esm/helpers/interleave.d.mts} +1 -1
  35. package/dist/esm/helpers/interleave.mjs +18 -0
  36. package/dist/{cjs/operators/helpers/iteratorToIterable.d.ts → esm/helpers/iteratorToIterable.d.mts} +1 -1
  37. package/dist/esm/helpers/iteratorToIterable.mjs +13 -0
  38. package/dist/{cjs/operators/helpers/toArray.d.ts → esm/helpers/toArray.d.mts} +1 -1
  39. package/dist/esm/helpers/toArray.mjs +15 -0
  40. package/dist/{cjs/sync/helpers/toAsyncIterable.d.ts → esm/helpers/toAsyncIterable.d.mts} +2 -2
  41. package/dist/esm/helpers/toAsyncIterable.mjs +15 -0
  42. package/dist/{cjs/operators/helpers/util.d.ts → esm/helpers/util.d.mts} +2 -2
  43. package/dist/esm/helpers/util.mjs +10 -0
  44. package/dist/esm/index.d.mts +9 -0
  45. package/dist/esm/index.mjs +11 -0
  46. package/dist/{cjs/operators/internalTypes.d.ts → esm/internalTypes.d.mts} +1 -1
  47. package/dist/esm/internalTypes.mjs +2 -0
  48. package/dist/{cjs/sync/operators/append.d.ts → esm/operators/append.d.mts} +2 -2
  49. package/dist/esm/operators/append.mjs +36 -0
  50. package/dist/{cjs/operators/operators/await.d.ts → esm/operators/await.d.mts} +1 -1
  51. package/dist/{cjs/operators/await.cjs → esm/operators/await.mjs} +2 -5
  52. package/dist/{cjs/operators/operators/combine.d.ts → esm/operators/combine.d.mts} +3 -3
  53. package/dist/esm/operators/combine.mjs +19 -0
  54. package/dist/{cjs/operators/operators/concatMap.d.ts → esm/operators/concatMap.d.mts} +1 -1
  55. package/dist/esm/operators/concatMap.mjs +19 -0
  56. package/dist/{cjs/operators/operators/filter.d.ts → esm/operators/filter.d.mts} +2 -2
  57. package/dist/esm/operators/filter.mjs +30 -0
  58. package/dist/{cjs/operators/operators/first.d.ts → esm/operators/first.d.mts} +2 -2
  59. package/dist/esm/operators/first.mjs +34 -0
  60. package/dist/{cjs/operators/operators/flatten.d.ts → esm/operators/flatten.d.mts} +1 -1
  61. package/dist/esm/operators/flatten.mjs +19 -0
  62. package/dist/esm/operators/index.d.mts +17 -0
  63. package/dist/esm/operators/index.mjs +16 -0
  64. package/dist/{cjs/operators/operators/joinStrings.d.ts → esm/operators/joinStrings.d.mts} +1 -1
  65. package/dist/esm/operators/joinStrings.mjs +22 -0
  66. package/dist/{cjs/operators/operators/last.d.ts → esm/operators/last.d.mts} +2 -2
  67. package/dist/esm/operators/last.mjs +39 -0
  68. package/dist/{cjs/operators/operators/map.d.ts → esm/operators/map.d.mts} +1 -1
  69. package/dist/esm/operators/map.mjs +19 -0
  70. package/dist/{cjs/operators/operators/reduce.d.ts → esm/operators/reduce.d.mts} +1 -1
  71. package/dist/esm/operators/reduce.mjs +49 -0
  72. package/dist/{cjs/operators/operators/skip.d.ts → esm/operators/skip.d.mts} +1 -1
  73. package/dist/esm/operators/skip.mjs +27 -0
  74. package/dist/{operators/take.d.ts → esm/operators/take.d.mts} +1 -1
  75. package/dist/esm/operators/take.mjs +31 -0
  76. package/dist/{cjs/sync/operators/tap.d.ts → esm/operators/tap.d.mts} +1 -1
  77. package/dist/esm/operators/tap.mjs +36 -0
  78. package/dist/{cjs/operators/operators/types.d.ts → esm/operators/types.d.mts} +1 -1
  79. package/dist/esm/operators/types.mjs +2 -0
  80. package/dist/{operators/unique.d.ts → esm/operators/unique.d.mts} +1 -1
  81. package/dist/esm/operators/unique.mjs +53 -0
  82. package/dist/{cjs/operators/pipe.d.ts → esm/pipe.d.mts} +2 -2
  83. package/dist/esm/pipe.mjs +10 -0
  84. package/dist/{cjs/sync/reduce.d.ts → esm/reduce.d.mts} +2 -2
  85. package/dist/esm/reduce.mjs +21 -0
  86. package/dist/{cjs/operators/sync/index.d.ts → esm/sync/index.d.mts} +6 -6
  87. package/dist/{cjs/sync/sync/index.d.ts → esm/sync/index.mjs} +5 -6
  88. package/package.json +41 -57
  89. package/dist/cjs/index.cjs +0 -644
  90. package/dist/cjs/operators/helpers/index.d.ts +0 -7
  91. package/dist/cjs/operators/helpers/toAsyncIterable.d.ts +0 -11
  92. package/dist/cjs/operators/index.cjs +0 -508
  93. package/dist/cjs/operators/joinStrings.cjs +0 -49
  94. package/dist/cjs/operators/operators/append.d.ts +0 -15
  95. package/dist/cjs/operators/operators/index.d.ts +0 -17
  96. package/dist/cjs/operators/operators/take.d.ts +0 -8
  97. package/dist/cjs/operators/operators/tap.d.ts +0 -19
  98. package/dist/cjs/operators/operators/unique.d.ts +0 -4
  99. package/dist/cjs/operators/types.cjs +0 -2
  100. package/dist/cjs/sync/helpers/distribute.d.ts +0 -13
  101. package/dist/cjs/sync/helpers/index.d.ts +0 -7
  102. package/dist/cjs/sync/helpers/interleave.d.ts +0 -2
  103. package/dist/cjs/sync/helpers/iteratorToIterable.d.ts +0 -3
  104. package/dist/cjs/sync/helpers/toArray.d.ts +0 -6
  105. package/dist/cjs/sync/helpers/util.d.ts +0 -4
  106. package/dist/cjs/sync/index.cjs +0 -245
  107. package/dist/cjs/sync/internalTypes.d.ts +0 -17
  108. package/dist/cjs/sync/operators/await.d.ts +0 -2
  109. package/dist/cjs/sync/operators/combine.d.ts +0 -23
  110. package/dist/cjs/sync/operators/concatMap.d.ts +0 -4
  111. package/dist/cjs/sync/operators/filter.d.ts +0 -10
  112. package/dist/cjs/sync/operators/first.d.ts +0 -10
  113. package/dist/cjs/sync/operators/flatten.d.ts +0 -4
  114. package/dist/cjs/sync/operators/index.d.ts +0 -17
  115. package/dist/cjs/sync/operators/joinStrings.d.ts +0 -4
  116. package/dist/cjs/sync/operators/last.d.ts +0 -10
  117. package/dist/cjs/sync/operators/map.d.ts +0 -4
  118. package/dist/cjs/sync/operators/reduce.d.ts +0 -7
  119. package/dist/cjs/sync/operators/skip.d.ts +0 -4
  120. package/dist/cjs/sync/operators/take.d.ts +0 -8
  121. package/dist/cjs/sync/operators/types.d.ts +0 -4
  122. package/dist/cjs/sync/operators/unique.d.ts +0 -4
  123. package/dist/cjs/sync/pipe.d.ts +0 -20
  124. package/dist/helpers/distribute.d.ts +0 -13
  125. package/dist/helpers/index.d.ts +0 -7
  126. package/dist/helpers/interleave.d.ts +0 -2
  127. package/dist/helpers/iteratorToIterable.d.ts +0 -3
  128. package/dist/helpers/toArray.d.ts +0 -6
  129. package/dist/helpers/toAsyncIterable.d.ts +0 -11
  130. package/dist/helpers/util.d.ts +0 -4
  131. package/dist/index.d.ts +0 -9
  132. package/dist/internalTypes.d.ts +0 -17
  133. package/dist/operators/append.d.ts +0 -15
  134. package/dist/operators/await.d.ts +0 -2
  135. package/dist/operators/combine.d.ts +0 -23
  136. package/dist/operators/concatMap.d.ts +0 -4
  137. package/dist/operators/filter.d.ts +0 -10
  138. package/dist/operators/first.d.ts +0 -10
  139. package/dist/operators/flatten.d.ts +0 -4
  140. package/dist/operators/index.d.ts +0 -17
  141. package/dist/operators/joinStrings.d.ts +0 -4
  142. package/dist/operators/last.d.ts +0 -10
  143. package/dist/operators/map.d.ts +0 -4
  144. package/dist/operators/reduce.d.ts +0 -7
  145. package/dist/operators/skip.d.ts +0 -4
  146. package/dist/operators/tap.d.ts +0 -19
  147. package/dist/operators/types.d.ts +0 -4
  148. package/dist/pipe.d.ts +0 -20
  149. package/dist/reduce.d.ts +0 -16
  150. package/dist/sync/index.d.ts +0 -6
@@ -1,10 +0,0 @@
1
- import type { PipeFn } from '../internalTypes.js';
2
- export declare function opLastAsync<T, S extends T>(lastFn: (v: T) => v is S): (iter: AsyncIterable<T>) => AsyncIterable<S>;
3
- export declare function opLastAsync<T, S extends Awaited<T>>(lastFn: (v: Awaited<T>) => v is S): (iter: AsyncIterable<T>) => AsyncIterable<S>;
4
- export declare function opLastAsync<T>(lastFn: (v: Awaited<T>) => boolean): (iter: AsyncIterable<T>) => AsyncIterable<Awaited<T>>;
5
- export declare function opLastAsync<T>(lastFn: (v: Awaited<T>) => Promise<boolean>): (iter: AsyncIterable<T>) => AsyncIterable<Awaited<T>>;
6
- export declare function opLastSync<T, S extends T>(lastFn: (v: T) => v is S): (iter: Iterable<T>) => Iterable<S>;
7
- export declare function opLastSync<T>(lastFn: (v: T) => boolean): (iter: Iterable<T>) => Iterable<T>;
8
- export declare function opLast<T, S extends T>(fn: (v: T) => v is S): PipeFn<T, S>;
9
- export declare function opLast<T>(fn: (v: T) => boolean): PipeFn<T, T>;
10
- //# sourceMappingURL=last.d.ts.map
@@ -1,4 +0,0 @@
1
- export declare function opMapAsync<T, U = T>(mapFn: (v: T) => U): (iter: AsyncIterable<T>) => AsyncIterable<U>;
2
- export declare function opMapSync<T, U = T>(mapFn: (v: T) => U): (iter: Iterable<T>) => Iterable<U>;
3
- export declare const opMap: <T, U>(fn: (v: T) => U) => import("../internalTypes.js").PipeFn<T, U>;
4
- //# sourceMappingURL=map.d.ts.map
@@ -1,7 +0,0 @@
1
- export declare function opReduceAsync<T>(reduceFn: (previousValue: T, currentValue: T) => T): (iter: AsyncIterable<T> | Iterable<T>) => AsyncIterable<T>;
2
- export declare function opReduceAsync<T>(reduceFn: (previousValue: T, currentValue: T) => T, initialValue: T | Promise<T>): (iter: AsyncIterable<T> | Iterable<T>) => AsyncIterable<T>;
3
- export declare function opReduceAsync<T, U>(reduceFn: (previousValue: U, currentValue: T) => U, initialValue: U | Promise<U>): (iter: AsyncIterable<T> | Iterable<T>) => AsyncIterable<U>;
4
- export declare function opReduceSync<T>(reduceFn: (previousValue: T, currentValue: T) => T): (iter: Iterable<T>) => Iterable<T>;
5
- export declare function opReduceSync<T>(reduceFn: (previousValue: T, currentValue: T) => T, initialValue: T): (iter: Iterable<T>) => Iterable<T>;
6
- export declare function opReduceSync<T, U>(reduceFn: (previousValue: U, currentValue: T) => U, initialValue: U): (iter: Iterable<T>) => Iterable<U>;
7
- //# sourceMappingURL=reduce.d.ts.map
@@ -1,4 +0,0 @@
1
- export declare function opSkipAsync<T>(count: number): (iter: AsyncIterable<T> | Iterable<T>) => AsyncIterable<T>;
2
- export declare function opSkipSync<T>(count: number): (iter: Iterable<T>) => Iterable<T>;
3
- export declare const opSkip: <T>(count: number) => import("../internalTypes.js").PipeFn<T, T>;
4
- //# sourceMappingURL=skip.d.ts.map
@@ -1,19 +0,0 @@
1
- /**
2
- * Tap allows you to listen on values, without modifying them.
3
- *
4
- * @param fn - function to call for each value.
5
- */
6
- export declare function opTapAsync<T>(tapFn: (v: T) => void): (iter: AsyncIterable<T>) => AsyncIterable<T>;
7
- /**
8
- * Tap allows you to listen on values, without modifying them.
9
- *
10
- * @param fn - function to call for each value.
11
- */
12
- export declare function opTapSync<T>(tapFn: (v: T) => void): (iter: Iterable<T>) => Iterable<T>;
13
- /**
14
- * Tap allows you to listen on values, without modifying them.
15
- *
16
- * @param fn - function to call for each value.
17
- */
18
- export declare const opTap: <T>(fn: (v: T) => void) => import("../internalTypes.js").PipeFn<T, T>;
19
- //# sourceMappingURL=tap.d.ts.map
@@ -1,4 +0,0 @@
1
- export type OperatorSync<T, U = T> = (i: Iterable<T>) => Iterable<U>;
2
- export type OperatorAsync<T, U = T> = (i: AsyncIterable<T>) => AsyncIterable<U>;
3
- export type OperatorSyncToAsync<T, U = T> = (i: Iterable<T>) => AsyncIterable<U>;
4
- //# sourceMappingURL=types.d.ts.map
package/dist/pipe.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import type { AnyIterable, PipeAsyncTx, PipeSyncTx } from './internalTypes.js';
2
- export declare function pipeAsync<T>(i: AnyIterable<T>): AsyncIterable<T>;
3
- export declare function pipeAsync<T, T0>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0]>): AsyncIterable<T0>;
4
- export declare function pipeAsync<T, T0, T1>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1]>): AsyncIterable<T1>;
5
- export declare function pipeAsync<T, T0, T1, T2>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2]>): AsyncIterable<T2>;
6
- export declare function pipeAsync<T, T0, T1, T2, T3>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2, T3]>): AsyncIterable<T3>;
7
- export declare function pipeAsync<T, T0, T1, T2, T3, T4>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4]>): AsyncIterable<T4>;
8
- export declare function pipeAsync<T, T0, T1, T2, T3, T4, T5>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5]>): AsyncIterable<T5>;
9
- export declare function pipeAsync<T, T0, T1, T2, T3, T4, T5, T6>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): AsyncIterable<T6>;
10
- export declare function pipeAsync<T, T0, T1, T2, T3, T4, T5, T6, T7>(i: AnyIterable<T>, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): AsyncIterable<T7>;
11
- export declare function pipeSync<T>(i: Iterable<T>): Iterable<T>;
12
- export declare function pipeSync<T, T0 = T>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0]>): Iterable<T0>;
13
- export declare function pipeSync<T, T0, T1>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1]>): Iterable<T1>;
14
- export declare function pipeSync<T, T0, T1, T2>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2]>): Iterable<T2>;
15
- export declare function pipeSync<T, T0, T1, T2, T3>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3]>): Iterable<T3>;
16
- export declare function pipeSync<T, T0, T1, T2, T3, T4>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4]>): Iterable<T4>;
17
- export declare function pipeSync<T, T0, T1, T2, T3, T4, T5>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5]>): Iterable<T5>;
18
- export declare function pipeSync<T, T0, T1, T2, T3, T4, T5, T6>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): Iterable<T6>;
19
- export declare function pipeSync<T, T0, T1, T2, T3, T4, T5, T6, T7>(i: Iterable<T>, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): Iterable<T7>;
20
- //# sourceMappingURL=pipe.d.ts.map
package/dist/reduce.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { AnyIterable } from './internalTypes.js';
2
- export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T): T | undefined;
3
- export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): T;
4
- export declare function reduceSync<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue?: T): T | undefined;
5
- export declare function reduceSync<T, U>(iter: Iterable<T>, reduceFn: (prev: U, curr: T) => U, initialValue: U): U;
6
- export declare function reduceAsync<T>(iter: AnyIterable<T>, reduceFn: (prev: T, curr: T) => T): Promise<T | undefined>;
7
- export declare function reduceAsync<T>(iter: AnyIterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): Promise<T>;
8
- export declare function reduceAsync<T>(iter: AnyIterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue?: T): Promise<T | undefined>;
9
- export declare function reduceAsync<T, U>(iter: AnyIterable<T>, reduceFn: (prev: U, curr: T) => U, initialValue: U): Promise<U>;
10
- export declare function reduce<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T): T | undefined;
11
- export declare function reduce<T>(iter: Iterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): T;
12
- export declare function reduce<T, U>(iter: Iterable<T>, reduceFn: (prev: U, curr: T) => U, initialValue: U): U;
13
- export declare function reduce<T>(iter: AsyncIterable<T>, reduceFn: (prev: T, curr: T) => T): Promise<T | undefined>;
14
- export declare function reduce<T>(iter: AsyncIterable<T>, reduceFn: (prev: T, curr: T) => T, initialValue: T): Promise<T>;
15
- export declare function reduce<T, U>(iter: AsyncIterable<T>, reduceFn: (prev: U, curr: T) => U, initialValue: U): Promise<U>;
16
- //# sourceMappingURL=reduce.d.ts.map
@@ -1,6 +0,0 @@
1
- export { toArraySync as toArray } from '../helpers/toArray.js';
2
- export type { OperatorSync as Operator } from '../operators/index.js';
3
- export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.js';
4
- export { pipeSync as pipe, pipeSync } from '../pipe.js';
5
- export { reduceSync as reduce } from '../reduce.js';
6
- //# sourceMappingURL=index.d.ts.map