@cspell/cspell-pipe 6.12.0 → 6.13.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.
- package/dist/operators/combine.d.ts +23 -0
- package/dist/operators/combine.js +24 -0
- package/dist/operators/index.d.ts +2 -0
- package/dist/operators/index.js +4 -1
- package/dist/operators/types.d.ts +4 -0
- package/dist/operators/types.js +3 -0
- package/dist/pipe.js +4 -10
- package/dist/sync/index.d.ts +2 -1
- package/dist/sync/index.js +2 -1
- package/package.json +4 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PaFn, PipeAsyncTx, PipeSyncTx, PsFn } from '../internalTypes';
|
|
2
|
+
import { OperatorAsync, OperatorSync } from './types';
|
|
3
|
+
export declare function opCombineAsync<T>(): OperatorAsync<T>;
|
|
4
|
+
export declare function opCombineAsync<T, T0>(...f: PipeAsyncTx<[T, T0]>): OperatorAsync<T0>;
|
|
5
|
+
export declare function opCombineAsync<T, T0, T1>(...f: PipeAsyncTx<[T, T0, T1]>): OperatorAsync<T1>;
|
|
6
|
+
export declare function opCombineAsync<T, T0, T1, T2>(...f: PipeAsyncTx<[T, T0, T1, T2]>): OperatorAsync<T2>;
|
|
7
|
+
export declare function opCombineAsync<T, T0, T1, T2, T3>(...f: PipeAsyncTx<[T, T0, T1, T2, T3]>): OperatorAsync<T3>;
|
|
8
|
+
export declare function opCombineAsync<T, T0, T1, T2, T3, T4>(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4]>): OperatorAsync<T4>;
|
|
9
|
+
export declare function opCombineAsync<T, T0, T1, T2, T3, T4, T5>(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5]>): OperatorAsync<T5>;
|
|
10
|
+
export declare function opCombineAsync<T, T0, T1, T2, T3, T4, T5, T6>(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): OperatorAsync<T6>;
|
|
11
|
+
export declare function opCombineAsync<T, T0, T1, T2, T3, T4, T5, T6, T7>(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): OperatorAsync<T7>;
|
|
12
|
+
export declare function opCombineAsync<T>(...fns: PaFn<T, T>[]): OperatorAsync<T>;
|
|
13
|
+
export declare function opCombineSync<T>(): OperatorSync<T>;
|
|
14
|
+
export declare function opCombineSync<T, T0 = T>(...f: PipeSyncTx<[T, T0]>): OperatorSync<T0>;
|
|
15
|
+
export declare function opCombineSync<T, T0, T1>(...f: PipeSyncTx<[T, T0, T1]>): OperatorSync<T1>;
|
|
16
|
+
export declare function opCombineSync<T, T0, T1, T2>(...f: PipeSyncTx<[T, T0, T1, T2]>): OperatorSync<T2>;
|
|
17
|
+
export declare function opCombineSync<T, T0, T1, T2, T3>(...f: PipeSyncTx<[T, T0, T1, T2, T3]>): OperatorSync<T3>;
|
|
18
|
+
export declare function opCombineSync<T, T0, T1, T2, T3, T4>(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4]>): OperatorSync<T4>;
|
|
19
|
+
export declare function opCombineSync<T, T0, T1, T2, T3, T4, T5>(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5]>): OperatorSync<T5>;
|
|
20
|
+
export declare function opCombineSync<T, T0, T1, T2, T3, T4, T5, T6>(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): OperatorSync<T6>;
|
|
21
|
+
export declare function opCombineSync<T, T0, T1, T2, T3, T4, T5, T6, T7>(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): OperatorSync<T7>;
|
|
22
|
+
export declare function opCombineSync<T>(...fns: PsFn<T, T>[]): OperatorSync<T>;
|
|
23
|
+
//# sourceMappingURL=combine.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.opCombineSync = exports.opCombineAsync = void 0;
|
|
4
|
+
function opCombineAsync(...fns) {
|
|
5
|
+
function combine(iter) {
|
|
6
|
+
for (const fn of fns) {
|
|
7
|
+
iter = fn(iter);
|
|
8
|
+
}
|
|
9
|
+
return iter;
|
|
10
|
+
}
|
|
11
|
+
return combine;
|
|
12
|
+
}
|
|
13
|
+
exports.opCombineAsync = opCombineAsync;
|
|
14
|
+
function opCombineSync(...fns) {
|
|
15
|
+
function combine(iter) {
|
|
16
|
+
for (const fn of fns) {
|
|
17
|
+
iter = fn(iter);
|
|
18
|
+
}
|
|
19
|
+
return iter;
|
|
20
|
+
}
|
|
21
|
+
return combine;
|
|
22
|
+
}
|
|
23
|
+
exports.opCombineSync = opCombineSync;
|
|
24
|
+
//# sourceMappingURL=combine.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { opAppend, opAppendAsync, opAppendSync } from './append';
|
|
2
2
|
export { opAwaitAsync } from './await';
|
|
3
|
+
export { opCombineAsync, opCombineSync } from './combine';
|
|
3
4
|
export { opConcatMap, opConcatMapAsync, opConcatMapSync } from './concatMap';
|
|
4
5
|
export { opFilter, opFilterAsync, opFilterSync } from './filter';
|
|
5
6
|
export { opFirst, opFirstAsync, opFirstSync } from './first';
|
|
@@ -10,5 +11,6 @@ export { opMap, opMapAsync, opMapSync } from './map';
|
|
|
10
11
|
export { opSkip, opSkipAsync, opSkipSync } from './skip';
|
|
11
12
|
export { opTake, opTakeAsync, opTakeSync } from './take';
|
|
12
13
|
export { opTap, opTapAsync, opTapSync } from './tap';
|
|
14
|
+
export type { OperatorAsync, OperatorSync, OperatorSyncToAsync } from './types';
|
|
13
15
|
export { opUnique, opUniqueAsync, opUniqueSync } from './unique';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/operators/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.opUniqueSync = exports.opUniqueAsync = exports.opUnique = exports.opTapSync = exports.opTapAsync = exports.opTap = exports.opTakeSync = exports.opTakeAsync = exports.opTake = exports.opSkipSync = exports.opSkipAsync = exports.opSkip = exports.opMapSync = exports.opMapAsync = exports.opMap = exports.opLastSync = exports.opLastAsync = exports.opLast = exports.opJoinStringsSync = exports.opJoinStringsAsync = exports.opJoinStrings = exports.opFlattenSync = exports.opFlattenAsync = exports.opFlatten = exports.opFirstSync = exports.opFirstAsync = exports.opFirst = exports.opFilterSync = exports.opFilterAsync = exports.opFilter = exports.opConcatMapSync = exports.opConcatMapAsync = exports.opConcatMap = exports.opAwaitAsync = exports.opAppendSync = exports.opAppendAsync = exports.opAppend = void 0;
|
|
3
|
+
exports.opUniqueSync = exports.opUniqueAsync = exports.opUnique = exports.opTapSync = exports.opTapAsync = exports.opTap = exports.opTakeSync = exports.opTakeAsync = exports.opTake = exports.opSkipSync = exports.opSkipAsync = exports.opSkip = exports.opMapSync = exports.opMapAsync = exports.opMap = exports.opLastSync = exports.opLastAsync = exports.opLast = exports.opJoinStringsSync = exports.opJoinStringsAsync = exports.opJoinStrings = exports.opFlattenSync = exports.opFlattenAsync = exports.opFlatten = exports.opFirstSync = exports.opFirstAsync = exports.opFirst = exports.opFilterSync = exports.opFilterAsync = exports.opFilter = exports.opConcatMapSync = exports.opConcatMapAsync = exports.opConcatMap = exports.opCombineSync = exports.opCombineAsync = exports.opAwaitAsync = exports.opAppendSync = exports.opAppendAsync = exports.opAppend = void 0;
|
|
4
4
|
var append_1 = require("./append");
|
|
5
5
|
Object.defineProperty(exports, "opAppend", { enumerable: true, get: function () { return append_1.opAppend; } });
|
|
6
6
|
Object.defineProperty(exports, "opAppendAsync", { enumerable: true, get: function () { return append_1.opAppendAsync; } });
|
|
7
7
|
Object.defineProperty(exports, "opAppendSync", { enumerable: true, get: function () { return append_1.opAppendSync; } });
|
|
8
8
|
var await_1 = require("./await");
|
|
9
9
|
Object.defineProperty(exports, "opAwaitAsync", { enumerable: true, get: function () { return await_1.opAwaitAsync; } });
|
|
10
|
+
var combine_1 = require("./combine");
|
|
11
|
+
Object.defineProperty(exports, "opCombineAsync", { enumerable: true, get: function () { return combine_1.opCombineAsync; } });
|
|
12
|
+
Object.defineProperty(exports, "opCombineSync", { enumerable: true, get: function () { return combine_1.opCombineSync; } });
|
|
10
13
|
var concatMap_1 = require("./concatMap");
|
|
11
14
|
Object.defineProperty(exports, "opConcatMap", { enumerable: true, get: function () { return concatMap_1.opConcatMap; } });
|
|
12
15
|
Object.defineProperty(exports, "opConcatMapAsync", { enumerable: true, get: function () { return concatMap_1.opConcatMapAsync; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare type OperatorSync<T, U = T> = (i: Iterable<T>) => Iterable<U>;
|
|
2
|
+
export declare type OperatorAsync<T, U = T> = (i: AsyncIterable<T>) => AsyncIterable<U>;
|
|
3
|
+
export declare type OperatorSyncToAsync<T, U = T> = (i: Iterable<T>) => AsyncIterable<U>;
|
|
4
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/pipe.js
CHANGED
|
@@ -2,20 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pipeSync = exports.pipeAsync = void 0;
|
|
4
4
|
const helpers_1 = require("./helpers");
|
|
5
|
+
const operators_1 = require("./operators");
|
|
5
6
|
function pipeAsync(i, ...fns) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
iter = fn(iter);
|
|
9
|
-
}
|
|
10
|
-
return iter;
|
|
7
|
+
const iter = (0, helpers_1.toAsyncIterable)(i);
|
|
8
|
+
return (0, operators_1.opCombineAsync)(...fns)(iter);
|
|
11
9
|
}
|
|
12
10
|
exports.pipeAsync = pipeAsync;
|
|
13
11
|
function pipeSync(i, ...fns) {
|
|
14
|
-
|
|
15
|
-
for (const fn of fns) {
|
|
16
|
-
iter = fn(iter);
|
|
17
|
-
}
|
|
18
|
-
return iter;
|
|
12
|
+
return (0, operators_1.opCombineSync)(...fns)(i);
|
|
19
13
|
}
|
|
20
14
|
exports.pipeSync = pipeSync;
|
|
21
15
|
//# sourceMappingURL=pipe.js.map
|
package/dist/sync/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { toArraySync as toArray } from '../helpers/toArray';
|
|
2
|
-
export { opAppendSync as opAppend, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators';
|
|
2
|
+
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, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators';
|
|
3
|
+
export type { OperatorSync as Operator } from '../operators';
|
|
3
4
|
export { pipeSync as pipe, pipeSync } from '../pipe';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/sync/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pipeSync = exports.pipe = exports.opUnique = exports.opTap = exports.opTake = exports.opSkip = exports.opMap = exports.opLast = exports.opJoinStrings = exports.opFlatten = exports.opFirst = exports.opFilter = exports.opConcatMap = exports.opAppend = exports.toArray = void 0;
|
|
3
|
+
exports.pipeSync = exports.pipe = exports.opUnique = exports.opTap = exports.opTake = exports.opSkip = exports.opMap = exports.opLast = exports.opJoinStrings = exports.opFlatten = exports.opFirst = exports.opFilter = exports.opConcatMap = exports.opCombine = exports.opAppend = exports.toArray = void 0;
|
|
4
4
|
var toArray_1 = require("../helpers/toArray");
|
|
5
5
|
Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArraySync; } });
|
|
6
6
|
var operators_1 = require("../operators");
|
|
7
7
|
Object.defineProperty(exports, "opAppend", { enumerable: true, get: function () { return operators_1.opAppendSync; } });
|
|
8
|
+
Object.defineProperty(exports, "opCombine", { enumerable: true, get: function () { return operators_1.opCombineSync; } });
|
|
8
9
|
Object.defineProperty(exports, "opConcatMap", { enumerable: true, get: function () { return operators_1.opConcatMapSync; } });
|
|
9
10
|
Object.defineProperty(exports, "opFilter", { enumerable: true, get: function () { return operators_1.opFilterSync; } });
|
|
10
11
|
Object.defineProperty(exports, "opFirst", { enumerable: true, get: function () { return operators_1.opFirstSync; } });
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "6.
|
|
6
|
+
"version": "6.13.0",
|
|
7
7
|
"description": "Library to make working with Iterators/AsyncIterators easier.",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"cspell",
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
"node": ">=14"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@types/node": "^18.
|
|
114
|
-
"jest": "^29.
|
|
113
|
+
"@types/node": "^18.11.5",
|
|
114
|
+
"jest": "^29.2.2",
|
|
115
115
|
"rimraf": "^3.0.2"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "e111bc5af5d1f578dbef5454cfa23b6f2b28050e"
|
|
118
118
|
}
|