This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2021-06-06 20:25:14 +02:00

24 lines
388 B
JavaScript

// pass back all messages as is
// (except for errors and logs)
module.exports = cb => {
return {
message: message => {
if(message.type === 'error') {
cb(message.error);
}
else
cb(null, message);
},
exit: status => {
if(status !== 0)
cb('Child process has died.');
else
cb(null, { done: true });
}
}
}