UNPKG

456 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3// 3pp
4const cliProgress = require('cli-progress');
5function progress(options) {
6 // if no options passed, create empty options
7 if (!options) {
8 options = {};
9 }
10 // set noTTYOutput for options
11 options.noTTYOutput = Boolean(process.env.TERM === 'dumb' || !process.stdin.isTTY);
12 return new cliProgress.SingleBar(options);
13}
14exports.default = progress;