This commit is contained in:
2021-11-21 11:18:28 +01:00
parent 7a358eb836
commit 230b10b2a3
9339 changed files with 892519 additions and 62 deletions

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

@@ -0,0 +1,17 @@
'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;
};
};