probe.war使用_使用console-probe更好的Node.js控制台转储

probe.war使用

Writing JavaScript in the Node.js environment has always felt a bit more difficult; probably because browser developer tools have become incredibly powerful, interactive, and visually appealing.  Using console.log on the client side isn't the best of experiences and obviously isn't interactive.

在Node.js环境中编写JavaScript总是感到有些困难。 可能是因为浏览器开发人员工具已经变得功能强大,具有交互性并且在视觉上具有吸引力。 在客户端使用console.log并不是最好的体验,并且显然不是交互式的。

Though not interactive, I've found that console-probe is an improvement over console.log, providing me highlighted property types, lengths, and a nice visual tree view.

尽管不是交互式的,但我发现console-probe是对console.log的改进,为我提供了突出显示的属性类型,长度和漂亮的可视化树状视图。


const probe = require('console-probe')

const donut = {
  'id': '0001',
  'type': 'donut',
  'name': 'Cake',
  'description': 'A small fried cake of sweetened dough, typically in the shape of a ball or ring.',
  'ppu': 0.55,
  'common': true,
  'batters':
  {
    'batter':
    [
      { 'id': '1001', 'type': 'Regular' },
      { 'id': '1002', 'type': 'Chocolate' },
      { 'id': '1003', 'type': 'Blueberry' },
      { 'id': '1004', 'type': "Devil's Food" }
    ]
  },
  // .....


// Highlight nicely to console
const prober = probe.get()
prober(donut)


console-probe is one of those nice, luxury utilities that can make debugging in a static environment just a bit better!

console-probe是那些不错的工具,可以在静态环境中进行调试好一些!

翻译自: https://davidwalsh.name/console-probe

probe.war使用

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值