astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
27 lines (26 loc) • 461 B
JavaScript
function compose(destinations) {
return {
write(chunk) {
for (const logger of destinations) {
logger.write(chunk);
}
},
flush() {
for (const logger of destinations) {
if (logger.flush) {
logger.flush();
}
}
},
close() {
for (const logger of destinations) {
if (logger.close) {
logger.close();
}
}
}
};
}
export {
compose as default
};