Skip to content

Commit f582a62

Browse files
committed
feat(options): pass options to constructor
1 parent 010f0de commit f582a62

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
/* eslint-disable no-param-reassign */
22
/* eslint no-console: off */
33
import _ from 'lodash'
4-
<<<<<<< HEAD
5-
import chalk from 'chalk'
6-
// import chalkExt from './chalkExt'
7-
=======
84

95
import chalkExt from './chalkExt'
10-
>>>>>>> 1871a68 (* feat: pass options to Logger instance)
116

127
// TODO: use static props -> update babel!
138
class Logger {
@@ -29,20 +24,11 @@ class Logger {
2924
log(str, type = 'log', styleCustom) {
3025
const {prefix, [type]: typeOptions} = this.options
3126

32-
<<<<<<< HEAD
33-
return true
34-
}
35-
36-
const {style, prefix} = this.options
37-
const typeOptions = this.options[type]
38-
39-
=======
4027
if (arguments.length === 1) {
4128
console.log(chalkExt`${prefix}${str}`)
4229
return
4330
}
4431

45-
>>>>>>> 1871a68 (* feat: pass options to Logger instance)
4632
console.log(
4733
(prefix ? chalkExt`${prefix}` : '') +
4834
(typeOptions.prefix ? chalkExt`${typeOptions.prefix}` : '') +

test/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ log.debug('{bgBlue.magenta CUSTOM{reset.yellow debug}{bgBlack.cyan info}}')
1010

1111
log.error('unexpected bahavior')
1212
log.success('logger running!')
13-
<<<<<<< HEAD
14-
// Logger.log('{reset.magenta custom {bgBlackBright.yellow output style}}')
15-
Logger.debug('standard debug info')
16-
=======
1713

1814
log.log('{bgBlue.bold.magenta custom output style}')
19-
>>>>>>> 1871a68 (* feat: pass options to Logger instance)
2015

0 commit comments

Comments
 (0)