Skip to content

Commit

Permalink
Added more examples and fixed typo
Browse files Browse the repository at this point in the history
Fixed an out-of-order issue by my edits.
Better description and added example for toType function
  • Loading branch information
RobertDeRose committed Aug 24, 2015
1 parent 060a813 commit af0089b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -146,13 +146,19 @@ cli.withInput(file, function (line, newline, eof) {
}
});
```
*Note: `file` can be omitted if you want to work with stdin*
```javascript
cli.toType(object) // While return a string of the type of Object if it is a Built-in Type
//cli.toType(object); If a Built-in type, returns the name of the type as a lower cased String
cli.toType([]); // 'array'
cli.toType(new Date()); // 'date'
cli.toType(1); // 'integer'
cli.toType(1.1); // 'float'
cli.toType(Math); // 'math'
cli.toType(/a/); // 'regex'
cli.toType(JSON); // 'json'
```
*Note: `file` can be omitted if you want to work with stdin*
To output a progress bar, call
```javascript
Expand Down

0 comments on commit af0089b

Please sign in to comment.