Skip to content

Commit

Permalink
more info in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
StreetStrider committed Mar 27, 2015
1 parent 8d478ba commit 69ed0f4
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# console-ultimate

Node-compatible `console` object with extra features. Replace default one with this and you'll have nice styles and advanced features out of the box. Features include: timers, terminal clear, customizable styles and behavior for every function, on-off options for every additional function and other.

# install
All Node-related features are enabled by default and can be noop-ed if required. Any additional feature can be easily turned on and customized.

Now all Node-related features is **implemented** and this module can be used as **drop-in** replacement for **standard console**.


## install
```sh
npm install console-ultimate
# or
npm install StreetStrider/console-ultimate
```

# usage

## usage
### instantiate

```javascript
var Console = require('console-ultimate');
var console;
Expand All @@ -22,6 +29,14 @@ console = Console();

console.log('...');
```

The third parameter can be used to pass any options.
```javascript
Console(stdout, stderr, options)
```


### styling
`Console.colors` and any console instance `.colors` property is a ref to [cli-color](https://github.com/medikoo/cli-color). It can be used for customizing output styles.

```javascript
Expand All @@ -36,7 +51,27 @@ console = Console(null, null, {
console.log('...'); // output is bold now
```

# todo

### features
Addtional features are managed by feature-gates.
```javascript
console = Console(null, null, {
clear: true, /* enable `clear` method */
count: true, /* enable `count` method */

timer: /* enable `time`, `timeEnd` */
{
hrtime: true /* tune it to use hi-precision timer */
}
});
```

### examples
You can find feature-by-feature examples in `examples/` directory.


## todo
Work on features is not come to end. Many additional interesting features, such as ansi-tables and grouping will arrive. Also, tests will be required if any interest to this module occur.

* features:
* [x] log, info, warn, error
Expand Down

0 comments on commit 69ed0f4

Please sign in to comment.