Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【每日一击】(20.5.14)- npm--debug模块 #40

Open
XJIANBIN opened this issue May 14, 2020 · 0 comments
Open

【每日一击】(20.5.14)- npm--debug模块 #40

XJIANBIN opened this issue May 14, 2020 · 0 comments

Comments

@XJIANBIN
Copy link
Owner

概述

dubug模块暴露一个函数,返回一个修饰过的console.error函数:
修饰:

  • 加前缀(传入的字符串参数,用于区分不同的debug实例)
  • 给前缀加颜色

通过不同debug实例的前缀和颜色区分, 能方便的实现模块之间及模块各部分之间的debug的切换.

文章

npm--debug模块

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant