examples/example-align.js
function showPreset(name, pos){
    console.log(_colors.magenta('Preset: ' + name));

    // create a new progress bar with preset
    var bar = new _progress.Bar({
	    align: pos
    }, _progress.Presets[name] || _progress.Presets.legacy);
    bar.start(200, 0);

    // random value 1..200
    bar.update(Math.floor((Math.random() * 200) + 1));
    bar.stop();
    console.log('');
}
function showPreset(name, pos){
    console.log(_colors.magenta('Preset: ' + name));

    // create a new progress bar with preset
    var bar = new _progress.Bar({
	    align: pos
    }, _progress.Presets[name] || _progress.Presets.legacy);
    bar.start(200, 0);

    // random value 1..200
    bar.update(Math.floor((Math.random() * 200) + 1));
    bar.stop();
    console.log('');
}
function showPreset ( name , pos ) { console . log ( _colors . magenta ( 'Preset: ' + name ) ) ; // create a new progress bar with preset var bar = new _progress . Bar ( { align : pos } , _progress . Presets [ name ] || _progress . Presets . legacy ) ; bar . start ( 200 , 0 ) ; // random value 1..200 bar . update ( Math . floor ( ( Math . random ( ) * 200 ) + 1 ) ) ; bar . stop ( ) ; console . log ( '' ) ; }
helper function to display preset
helper function to display preset