debug icon indicating copy to clipboard operation
debug copied to clipboard

Custom output formatting

Open chagris opened this issue 6 years ago • 5 comments

Closes #582.

This pull request is an attempt at implementing https://github.com/visionmedia/debug/issues/582. As stated by my comment there, this code isn't yet complete and actually ready to be merged, and is waiting for edits and feebacks!

chagris avatar Dec 13 '18 13:12 chagris

Coverage Status

Coverage increased (+0.4%) to 87.179% when pulling 8fa6444b043089a08080197f272013bcdd2ad508 on chagris:format into 5fadf4544d32531a91519299f6850620c6a0221e on visionmedia:master.

coveralls avatar Dec 13 '18 13:12 coveralls

I added the "metaformatters" flag prefixes %J (JSON.stringify()), %c and %C (color and color + bold (node)) as I proposed here https://github.com/visionmedia/debug/issues/582#issuecomment-446973503, however I'm not 100% on it (they could just as well stay special-case-flags), so it should be easy to revert

Also, I'm not sure what to do about node's formatters %o / %O coloring (based on DEBUG_COLORS and isatty()), and passing other inspectOpts

chagris avatar Dec 14 '18 14:12 chagris

Hey @chagris - sorry I haven't had time to review this or give much input. However I appreciate the work being done.

Admittedly it'll be a little longer before I'll be able to get to this; however, I've done two things here:

  1. I revised this PR's title a bit to be less 'prototype'-ey
  2. I added the magic keywords Closes #xxx. which Github will handle upon merging this PR.

Qix- avatar Dec 19 '18 00:12 Qix-

2.6.8

RabiaSaid avatar Jun 21 '22 12:06 RabiaSaid

4.3.4

RabiaSaid avatar Jun 21 '22 12:06 RabiaSaid