@acurast/cli
Version:
A cli to interact with the Acurast Cloud.
23 lines • 640 B
JavaScript
export const consoleOutput = (type) => {
return (message, json) => {
if (type === 'text') {
console.log(message);
}
else if (type === 'json') {
if (json) {
if (typeof json === 'string') {
console.log(json);
}
else {
console.log(JSON.stringify(json));
}
}
else {
if (message.length > 0) {
console.log(JSON.stringify({ message }));
}
}
}
};
};
//# sourceMappingURL=console-output.js.map