Galerie und tage
This commit is contained in:
17
node_modules/p-pipe/index.js
generated
vendored
17
node_modules/p-pipe/index.js
generated
vendored
@@ -1,17 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (...functions) => {
|
||||
if (functions.length === 0) {
|
||||
throw new Error('Expected at least one argument');
|
||||
}
|
||||
|
||||
return async input => {
|
||||
let currentValue = input;
|
||||
|
||||
for (const fn of functions) {
|
||||
currentValue = await fn(currentValue); // eslint-disable-line no-await-in-loop
|
||||
}
|
||||
|
||||
return currentValue;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user