UNPKG

ipld-explorer-cli

Version:

Explore the IPLD directed acyclic graph with your keyboard

14 lines (12 loc) 265 B
const ora = require('ora') exports.withSpin = (fn) => { return async function fnWithSpin (ctx) { ctx.spinner = ora().start() try { return await fn.apply(this, arguments) } finally { ctx.spinner.stop() ctx.spinner = null } } }