astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
24 lines (23 loc) • 381 B
JavaScript
export default 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();
}
}
}
};
}