File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,9 @@ const format = {
133
133
134
134
class Logger {
135
135
136
- constructor ( log , { alias = new Map ( ) } ) {
137
- this . npmlog = log ;
138
- this . aliasMap = new Map ( alias ) ;
136
+ constructor ( ) {
137
+ this . npmlog = npmlog ;
138
+ this . aliasMap = new Map ( ) ;
139
139
}
140
140
141
141
checkLevel ( l ) {
@@ -270,8 +270,8 @@ class Logger {
270
270
}
271
271
}
272
272
273
- function factroy ( log , opts = { } ) {
274
- return new Proxy ( new Logger ( log , opts ) , {
273
+ function factroy ( ) {
274
+ return new Proxy ( new Logger ( ) , {
275
275
get ( target , prop ) {
276
276
if ( prop in target ) {
277
277
return target [ prop ] ;
@@ -283,21 +283,21 @@ function factroy(log, opts = {}) {
283
283
if ( alias ) {
284
284
return target . getMethod ( alias ) ;
285
285
}
286
- const item = log [ prop ] ;
286
+ const item = npmlog [ prop ] ;
287
287
if ( _ . isFunction ( item ) ) {
288
- return item . bind ( log ) ;
288
+ return item . bind ( npmlog ) ;
289
289
}
290
290
return item ;
291
291
} ,
292
292
set ( target , prop , value ) {
293
- log [ prop ] = value ;
293
+ target [ prop ] = value ;
294
294
return true ;
295
295
} ,
296
296
} ) ;
297
297
}
298
298
299
299
function createInstance ( ) {
300
- return factroy ( npmlog ) ;
300
+ return factroy ( ) ;
301
301
}
302
302
303
303
module . exports = createInstance ( ) ;
You can’t perform that action at this time.
0 commit comments