Skip to content

Commit

Permalink
Exported isEnabled() as API method
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Sep 6, 2018
1 parent f275c40 commit b3454e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions signale.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ class Signale {
});
}

get isEnabled() {
return !this._disabled;
}

get date() {
return new Date().toLocaleDateString();
}
Expand Down Expand Up @@ -256,7 +252,7 @@ class Signale {
}

_log(message, streams = this._stream) {
if (this.isEnabled) {
if (this.isEnabled()) {
this._formatStream(streams).forEach(stream => {
this._write(stream, message);
});
Expand Down Expand Up @@ -295,6 +291,10 @@ class Signale {
this._disabled = false;
}

isEnabled() {
return !this._disabled;
}

scope(...name) {
if (name.length === 0) {
throw new Error('No scope name was defined.');
Expand Down

0 comments on commit b3454e1

Please sign in to comment.