Skip to content

Commit

Permalink
fix: rename private fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 5, 2018
1 parent 8d59075 commit 244fe5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/consola.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ export default class Consola {

// Prevate fields
// Used for constructur and create
this.types = options.types || defaultTypes
this.defaults = options.defaults || {}
this._types = options.types || options._types || defaultTypes
this._defaults = options.defaults || options._defaults || {}

// Method aliases
this.withDefaults = this.defaults
this.withScope = this.scope

// Create logger functions for current instance
for (const type in this.types) {
for (const type in this._types) {
this[type] = this._createLogFn(Object.assign(
{ type },
this.types[type],
this.defaults
this._types[type],
this._defaults
))
}
}
Expand Down

0 comments on commit 244fe5c

Please sign in to comment.