Skip to content

Commit

Permalink
Make IE11 consumers life (a little bit) easier
Browse files Browse the repository at this point in the history
Similarly to #870, provides a pure IE11 compliant includes-like for users that don't polyfill.
  • Loading branch information
nulltoken committed Mar 22, 2018
1 parent b639bc6 commit 87ad586
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import configuration from './configuration'

const logger = {
debug(...args) {
if (['debug'].includes(configuration.logLevel)) {
if (['debug'].indexOf(configuration.logLevel) !== -1) {
console.debug(...args)
}
},
log(...args) {
if (['debug', 'log'].includes(configuration.logLevel)) {
if (['debug', 'log'].indexOf(configuration.logLevel) !== -1) {
console.log(...args)
}
},
warn(...args) {
if (['debug', 'log', 'warn'].includes(configuration.logLevel)) {
if (['debug', 'log', 'warn'].indexOf(configuration.logLevel) !== -1) {
console.warn(...args)
}
},
error(...args) {
if (['debug', 'log', 'warn', 'error'].includes(configuration.logLevel)) {
if (['debug', 'log', 'warn', 'error'].indexOf(configuration.logLevel) !== -1) {
console.error(...args)
}
},
Expand Down

0 comments on commit 87ad586

Please sign in to comment.