schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

147
node_modules/p-pipe/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,147 @@
/* eslint-disable import/export */
export type UnaryFunction<ValueType, ReturnType> = (
value: ValueType
) => ReturnType | PromiseLike<ReturnType>;
export type Pipeline<ValueType, ReturnType> = (
value?: ValueType
) => Promise<ReturnType>;
/**
Compose promise-returning & async functions into a reusable pipeline.
@param ...input - Iterated over sequentially when returned `function` is called.
@returns The `input` functions are applied from left to right.
@example
```
import pPipe from 'p-pipe';
const addUnicorn = async string => `${string} Unicorn`;
const addRainbow = async string => `${string} Rainbow`;
const pipeline = pPipe(addUnicorn, addRainbow);
console.log(await pipeline('❤️'));
//=> '❤️ Unicorn Rainbow'
```
*/
export default function pPipe<ValueType, ReturnType>(
f1: UnaryFunction<ValueType, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<ValueType, ResultValue1, ReturnType>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<ValueType, ResultValue1, ResultValue2, ReturnType>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ResultValue4,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ResultValue4>,
f5: UnaryFunction<ResultValue4, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ResultValue4,
ResultValue5,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ResultValue4>,
f5: UnaryFunction<ResultValue4, ResultValue5>,
f6: UnaryFunction<ResultValue5, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ResultValue4,
ResultValue5,
ResultValue6,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ResultValue4>,
f5: UnaryFunction<ResultValue4, ResultValue5>,
f6: UnaryFunction<ResultValue5, ResultValue6>,
f7: UnaryFunction<ResultValue6, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ResultValue4,
ResultValue5,
ResultValue6,
ResultValue7,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ResultValue4>,
f5: UnaryFunction<ResultValue4, ResultValue5>,
f6: UnaryFunction<ResultValue5, ResultValue6>,
f7: UnaryFunction<ResultValue6, ResultValue7>,
f8: UnaryFunction<ResultValue7, ReturnType>
): Pipeline<ValueType, ReturnType>;
export default function pPipe<
ValueType,
ResultValue1,
ResultValue2,
ResultValue3,
ResultValue4,
ResultValue5,
ResultValue6,
ResultValue7,
ResultValue8,
ReturnType
>(
f1: UnaryFunction<ValueType, ResultValue1>,
f2: UnaryFunction<ResultValue1, ResultValue2>,
f3: UnaryFunction<ResultValue2, ResultValue3>,
f4: UnaryFunction<ResultValue3, ResultValue4>,
f5: UnaryFunction<ResultValue4, ResultValue5>,
f6: UnaryFunction<ResultValue5, ResultValue6>,
f7: UnaryFunction<ResultValue6, ResultValue7>,
f8: UnaryFunction<ResultValue7, ResultValue8>,
f9: UnaryFunction<ResultValue8, ReturnType>
): Pipeline<ValueType, ReturnType>;
// Fallbacks if more than 9 functions are passed as input (not type-safe).
export default function pPipe(
...functions: Array<UnaryFunction<any, unknown>>
): Pipeline<unknown, unknown>;

15
node_modules/p-pipe/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
export default function pPipe(...functions) {
if (functions.length === 0) {
throw new Error('Expected at least one argument');
}
return async input => {
let currentValue = input;
for (const function_ of functions) {
currentValue = await function_(currentValue); // eslint-disable-line no-await-in-loop
}
return currentValue;
};
}

9
node_modules/p-pipe/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

47
node_modules/p-pipe/package.json generated vendored Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "p-pipe",
"version": "4.0.0",
"description": "Compose promise-returning & async functions into a reusable pipeline",
"license": "MIT",
"repository": "sindresorhus/p-pipe",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"promise",
"pipe",
"pipeline",
"compose",
"composition",
"combine",
"flow",
"serial",
"functions",
"reusable",
"async",
"await",
"promises",
"bluebird"
],
"devDependencies": {
"ava": "^3.15.0",
"sinon": "^10.0.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}

54
node_modules/p-pipe/readme.md generated vendored Normal file
View File

@@ -0,0 +1,54 @@
# p-pipe
> Compose promise-returning & async functions into a reusable pipeline
## Install
```
$ npm install p-pipe
```
## Usage
```js
import pPipe from 'p-pipe';
const addUnicorn = async string => `${string} Unicorn`;
const addRainbow = async string => `${string} Rainbow`;
const pipeline = pPipe(addUnicorn, addRainbow);
console.log(await pipeline('❤️'));
//=> '❤️ Unicorn Rainbow'
```
## API
### pPipe(input…)
The `input` functions are applied from left to right.
#### input
Type: `Function`
Expected to return a `Promise` or any value.
## Related
- [p-each-series](https://github.com/sindresorhus/p-each-series) - Iterate over promises serially
- [p-series](https://github.com/sindresorhus/p-series) - Run promise-returning & async functions in series
- [p-waterfall](https://github.com/sindresorhus/p-waterfall) - Run promise-returning & async functions in series, each passing its result to the next
- [More…](https://github.com/sindresorhus/promise-fun)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-p-pipe?utm_source=npm-p-pipe&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>