mirror of
https://github.com/strapi/strapi.git
synced 2025-07-27 10:56:36 +00:00
16 lines
205 B
JavaScript
16 lines
205 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
const pipeAsync = (...methods) => async data => {
|
||
|
let res = data;
|
||
|
|
||
|
for (const method of methods) {
|
||
|
res = await method(res);
|
||
|
}
|
||
|
|
||
|
return res;
|
||
|
};
|
||
|
|
||
|
module.exports = {
|
||
|
pipeAsync,
|
||
|
};
|