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 = {
133133
134134class Logger {
135135
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 ( ) ;
139139 }
140140
141141 checkLevel ( l ) {
@@ -270,8 +270,8 @@ class Logger {
270270 }
271271}
272272
273- function factroy ( log , opts = { } ) {
274- return new Proxy ( new Logger ( log , opts ) , {
273+ function factroy ( ) {
274+ return new Proxy ( new Logger ( ) , {
275275 get ( target , prop ) {
276276 if ( prop in target ) {
277277 return target [ prop ] ;
@@ -283,21 +283,21 @@ function factroy(log, opts = {}) {
283283 if ( alias ) {
284284 return target . getMethod ( alias ) ;
285285 }
286- const item = log [ prop ] ;
286+ const item = npmlog [ prop ] ;
287287 if ( _ . isFunction ( item ) ) {
288- return item . bind ( log ) ;
288+ return item . bind ( npmlog ) ;
289289 }
290290 return item ;
291291 } ,
292292 set ( target , prop , value ) {
293- log [ prop ] = value ;
293+ target [ prop ] = value ;
294294 return true ;
295295 } ,
296296 } ) ;
297297}
298298
299299function createInstance ( ) {
300- return factroy ( npmlog ) ;
300+ return factroy ( ) ;
301301}
302302
303303module . exports = createInstance ( ) ;
You can’t perform that action at this time.
0 commit comments