Skip to content

Commit

Permalink
fixed docs: preset argument is of type object not string
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Apr 26, 2017
1 parent bc91be3 commit ccce482
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ You can find some basic examples in [example.js](https://github.com/AndiDittrich
```js
var _progress = require('cli-progress');

// create a new progress bar instance
var bar1 = new _progress.Bar();
// create a new progress bar instance and use shades_classic theme
var bar1 = new _progress.Bar({}, _progress.Presets.shades_classic);

// start the progress bar with a total value of 200 and start value of 0
bar1.start(200, 0);
Expand All @@ -75,7 +75,7 @@ bar1.stop();
Initialize a new Progress bar. An instance can be used **multiple** times! it's not required to re-create it!

```js
var <instance> = new namespace.Bar(options:object, preset:string);
var <instance> = new namespace.Bar(options:object, preset:object);
```

#### start() ####
Expand Down
2 changes: 1 addition & 1 deletion example-presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function showPreset(name){
console.log(_colors.magenta('Preset: ' + name));

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

// random value 1..200
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cli-progress",
"version": "1.4.0",
"version": "1.4.1",
"description": "Easy to use Progress-Bar for Command-Line/Terminal Applications",
"keywords": [
"cli",
Expand Down

0 comments on commit ccce482

Please sign in to comment.