dbg:一个简单而轻量级的 console.log 替换,带有一些额外的奖励

时间:2024-07-12 14:35:33
【文件属性】:

文件名称:dbg:一个简单而轻量级的 console.log 替换,带有一些额外的奖励

文件大小:2KB

文件格式:ZIP

更新时间:2024-07-12 14:35:33

JavaScript

数据库 一个易于键入的console包装器 特征 打字更简单 将在不支持console浏览器或环境中静默失败 可以启用或禁用(在生产中有用) 保留行号 用法 只需在您的站点中包含 dbg.js 并使用您希望的任何方法: dbg.log('look, this is a log'); dbg.warn('it supports warnings and a heap of other methods as well as well!'); dbg.info('just check the source for all supported methods'); dbg.disable / dbg.enable 默认情况下,dbg 是启用的,但您可以禁用 dbg,如下所示: dbg.disable(); 禁用的 dbg 永远不会打印任何方法或执行任何实用功能,如计时或分析。 通常在生


【文件预览】:
dbg-master
----package.json(542B)
----README.md(1KB)
----dbg.js(1KB)

网友评论