
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Utility Tool in order to debug code. Runs console logs, checks objects in order to see if they are empty or undefined, and provides feedback through terminal. Also uses Mocha & Chai to run tests on itself verifying that it functions properly.
In order to setup the Util tool simply follow these steps:
Install the module into your project using npm install util-tool
Now that you have the module installed simply require it in your project files by using var util = require('util-tool')
In order to use the debugging functionality of the tool you have to run your project in DEBUG mode. Simply turn DEBUG mode on by running DEBUG=true whenever you start the server.
Enjoy the utility tool ( ^-^)
The util-tool was tested using Mocha and Chai for the unit testing. But the unit testing is not included in the npm install.
For information on the unit testing check out the files on GitHub.
In order to log using the util tool simply remember this format util.writer(title, data, status, consoleMethod).
Test #3: Successful functionExample Output:
util.writer('Testing Log', '', 'Test successful', 'log')
//Data was passed in as an empty string in order to leave whitespace.
Output:
=================================================
[2016-06-23T14:48:26-04:00]: Testing Log
=================================================
"" Test successful
The debugging portion of the tool is meant to discern whether or not data is empty or undefined. Simply write it in this format util.debug(data)
Example Output:
// Undefined Test
util.debug()
Output:
=================================================
[2016-06-21T14:29:47-04:00]: Data Check ?
=================================================
undefined
Data was undefined.
--------------------------------------------------
// Empty Test
util.debug({})
Output:
=================================================
[2016-06-21T14:30:41-04:00]: Data Check -
=================================================
{}
Data was empty.
--------------------------------------------------
// Successful Test
util.debug(['array'])
Output:
=================================================
[2016-06-21T14:30:41-04:00]: Data Check +
=================================================
['array']
Data was passed correctly.
This module is good to use with gulp.
Call this module to increment the version number.
const util = require('util-tool');
// takes the current version -> (string) & tag -> (string) ['major', 'minor', 'patch']
util.versionbump('1.0.0', 'major');
'2.0.0'
FAQs
Simple debugging and logging tool.
We found that util-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.