Skip to content

Commit 01695ee

Browse files
committed
Update docs
1 parent 0f733f2 commit 01695ee

File tree

5 files changed

+37
-31
lines changed

5 files changed

+37
-31
lines changed

index.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ const {
1919
Console
2020
} = console;
2121
class Verbosity extends Console {
22-
constructor(options = {}) {
23-
const {
24-
outStream,
25-
errorStream,
26-
verbosity,
27-
timestamp,
28-
namespace,
29-
prefix
30-
} = options;
31-
22+
constructor({
23+
outStream,
24+
errorStream,
25+
verbosity,
26+
timestamp,
27+
namespace,
28+
prefix
29+
} = {}) {
3230
const sOut = (ws => {
3331
if (!ws.writable) {
3432
throw new Error('Provided output stream must be writable');

index.mjs

+8-10
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ const {
1313
Console
1414
} = console;
1515
class Verbosity extends Console {
16-
constructor(options = {}) {
17-
const {
18-
outStream,
19-
errorStream,
20-
verbosity,
21-
timestamp,
22-
namespace,
23-
prefix
24-
} = options;
25-
16+
constructor({
17+
outStream,
18+
errorStream,
19+
verbosity,
20+
timestamp,
21+
namespace,
22+
prefix
23+
} = {}) {
2624
const sOut = (ws => {
2725
if (!ws.writable) {
2826
throw new Error('Provided output stream must be writable');

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"acorn": "^6.1.0",
5656
"ava": "^1.2.1",
5757
"documentation": "^9.1.1",
58-
"documentation-theme-bespoke": "^0.4.8",
58+
"documentation-theme-bespoke": "^0.4.9",
5959
"gulp": "^4.0.0",
6060
"gulp-better-rollup": "^3.4.0",
6161
"gulp-rename": "^1.4.0",
@@ -143,4 +143,4 @@
143143
]
144144
]
145145
}
146-
}
146+
}

src/lib/verbosity.class.js

+16-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {format, inspect} = util
1212
const {Console} = console
1313
/**
1414
* Generate a verbosity console
15-
* @param {Object} options - Configuration options.
15+
* @param {Object} options - Configuration options.
1616
* @param {stream.writable} options.outStream - Stream to write normal output
1717
* @param {stream.writable} options.errorStream - Stream to write error output
1818
* @param {Number} options.verbosity - The verboseness of output:
@@ -28,11 +28,14 @@ const {Console} = console
2828
* @return {Verbosity} Verbosity's console object.
2929
*/
3030
export default class Verbosity extends Console {
31-
constructor(options = {}) {
32-
const {
33-
outStream, errorStream, verbosity, timestamp, namespace, prefix
34-
} = options
35-
31+
constructor({
32+
outStream,
33+
errorStream,
34+
verbosity,
35+
timestamp,
36+
namespace,
37+
prefix
38+
} = {}) {
3639
const sOut = (ws => {
3740
if (!ws.writable) {
3841
throw new Error('Provided output stream must be writable')
@@ -221,6 +224,13 @@ export default class Verbosity extends Console {
221224
* @param {String} msg The debug message to log.
222225
* @param {...String} args Additional arguments to log.
223226
*/
227+
228+
/**
229+
* [debug description]
230+
* @param {[type]} msg [description]
231+
* @param {...[type]} args [description]
232+
* @return {[type]} [description]
233+
*/
224234
debug(msg, ...args) {
225235
this.route('debug', msg, ...args)
226236
}

0 commit comments

Comments
 (0)