Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oloshe committed Dec 10, 2020
1 parent a1d97c7 commit f962073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ coverage
test
.gitignore
jest.config.js
img
img
deno
2 changes: 1 addition & 1 deletion src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let debugLevel: debugLevelType = 3
const RedMark = '🔴 '
const _logFactory = function (f: keyof Console, level: number) {
return function (...args: any) {
debugLevel >= level && console[f].call(console, RedMark, ...args);
debugLevel >= level && (console[f] as Function).call(console, RedMark, ...args);
}
}
export const log = _logFactory('log', 3);
Expand Down

0 comments on commit f962073

Please sign in to comment.