Home
Forums
New posts
Search forums
What's new
New posts
New resources
New profile posts
Latest activity
Resources
Latest reviews
Search resources
Members
Current visitors
New profile posts
Search profile posts
DMCA Policy
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
FEEL FREE TO SHARE TUTORIALS, YOUR SKILS & KNOWLEDGE ON CODING, SCRIPTS, THEMES, PLUGINS OR ANY RESOURCES YOU HAVE WITH THE COMMUNITY-
Click Here To Post Your Request,
JOIN COMPUTER REPAIR FORUM
Home
Forums
TUTORIALS
CODING TUTORIALS
Node.js
Better Node.js Console Dumps with console-probe
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="codeguru" data-source="post: 60" data-attributes="member: 2"><p>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 [ICODE]console.log[/ICODE] on the client side isn’t the best of experiences and obviously isn’t interactive.</p><p></p><p>Though not interactive, I’ve found that <a href="https://www.npmjs.com/package/console-probe" target="_blank">console-probe</a> is an improvement over [ICODE]console.log[/ICODE], providing me highlighted property types, lengths, and a nice visual tree view.</p><p></p><p></p><p>const probe = require('console-probe')</p><p></p><p>const donut = {</p><p> 'id': '0001',</p><p> 'type': 'donut',</p><p> 'name': 'Cake',</p><p> 'description': 'A small fried cake of sweetened dough, typically in the shape of a ball or ring.',</p><p> 'ppu': 0.55,</p><p> 'common': true,</p><p> 'batters':</p><p> {</p><p> 'batter':</p><p> [</p><p> { 'id': '1001', 'type': 'Regular' },</p><p> { 'id': '1002', 'type': 'Chocolate' },</p><p> { 'id': '1003', 'type': 'Blueberry' },</p><p> { 'id': '1004', 'type': "Devil's Food" }</p><p> ]</p><p> },</p><p> // .....</p><p></p><p></p><p>// Highlight nicely to console</p><p>const prober = probe.get()</p><p>prober(donut)</p><p></p><p></p><p><img src="https://davidwalsh.name/demo/console-probe.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>console-probe is one of those nice, luxury utilities that can make debugging in a static environment just a bit better!</p><p></p><p>[URL unfurl="true"]https://davidwalsh.name/console-probe[/URL]</p></blockquote><p></p>
[QUOTE="codeguru, post: 60, member: 2"] 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 [ICODE]console.log[/ICODE] on the client side isn’t the best of experiences and obviously isn’t interactive. Though not interactive, I’ve found that [URL='https://www.npmjs.com/package/console-probe']console-probe[/URL] is an improvement over [ICODE]console.log[/ICODE], providing me highlighted property types, lengths, and a nice visual tree view. 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) [IMG]https://davidwalsh.name/demo/console-probe.png[/IMG] console-probe is one of those nice, luxury utilities that can make debugging in a static environment just a bit better! [URL unfurl="true"]https://davidwalsh.name/console-probe[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Richest Freecoded User
Most Freecoin
freecoded
4,838 Freecoin
Davy200
590 Freecoin
J
Johnhendrick
575 Freecoin
S
Smith16
527 Freecoin
nathan69
426 Freecoin
Laureine
415 Freecoin
A
anajeen
370 Freecoin
C
codeguru
287 Freecoin
Tekera
267 Freecoin
A
Akubay
170 Freecoin
Home
Forums
TUTORIALS
CODING TUTORIALS
Node.js
Better Node.js Console Dumps with console-probe
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top