Node Inspect Snippet for Sublime
Is pretty common use console logs in nodejs to check the value of variables you are working on.
But only the console.log
is not good enough some times. Mainly if the object you are checking has deep properties.
For these cases I usually use inspect
because it allows improve the log defining some options (showHidden
, depth
, colors
and customInspect
).
Due that I wrote a simple sublime snippet to help me create the logs:
inspect
source.js
nodejs - util.inspect
Typing inspect
will generate this snippet:
"\n---->", "util"obj, ;
Which will print something like this: