npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

udujs

v1.0.4

Published

A simple universal debugging utility for JavaScript code.

Downloads

6

Readme

UduJS

Build Status Coverage Status dependencies Status devDependencies Status

Русская версия здесь.

A simple universal debugging utility for JavaScript code. Designed for Node.js and browsers.

Make debugging more understandable and simple.

Support

Tested in:

  • Node.js 6-8.
  • Google Chrome 62-63.
  • Firefox Developer Edition 57-58.

Do you have suggestions, wishes or comments? Welcome to issue tracker!

Installation

$ npm i udujs

or

$ yarn add udujs

Usage

Inclusion in the project

Server code:

  • standard way (automatic definition of the working environment);
const UduJS = require('udujs');
const Debug = new UduJS();
  • direct connection of server methods.
const UduJS = require('udujs/Server');
const Debug = new UduJS();

Note: both these methods of inclusion are almost identical. You can apply any of them.

Code on the client:

  • standard way (not recommended);
const UduJS = require('udujs');
const Debug = new UduJS();
  • direct connection of client methods;
const UduJS = require('udujs/Client');
const Debug = new UduJS();
  • connect the compiled library directly to the HTML file (folder compiled).
<script src="js/mod/udujs-1.0.0.min.js"></script> <!-- For example -->
<script>
  var Debug = new UduJS();
</script>

Note: the standard method of inclusion can lead to swelling of files when compiling a bundle.

Customizing

When creating an instance of the utility, you can specify an object with custom settings. This will help you adjust the debugging process a little. For example:

const UduJS = require('udujs/Client');
const Debug = new UduJS({
  maxWidth: 'auto',
  fontSize: '1.2em',
  decimalPlaces: 4,
  popupColorScheme: 'dark',
});

General methods

.log(value, [comment]) API

Outputs debugging information to the console. This method returns nothing.

const someVariable = +100500;
Debug.log(someVariable);

Result (example code with common methods):

.rttPoint([name]) ⇒ number API

Run-time testing (RTT). Sets the control point in the code. Calculates the code execution time between two control points (in milliseconds).

  • Displays the calculated value in the console.
  • Returns the calculated value.
Debug.rttPoint();
someCode();
Debug.rttPoint('Some code was executed.');
someCode();
// Or, the result of the method can be assigned to a variable.
let lastPointResult = Debug.rttPoint('More code.');

Result (example code with common methods):

.rttStart([name], [levelIndex]) API

Run-time testing (RTT). The starting point for computing the execution time of some code. This method returns nothing.

.rttFinish([levelIndex]) ⇒ number API

Run-time testing (RTT). The end point for the rttStart() method. Calculates the execution time of the code between the start and current points (in milliseconds).

  • Displays the calculated value in the console.
  • Returns the calculated value.
Debug.rttStart('Single testing of some code.');
someCode();
Debug.rttFinish();
// Or, the result of the method can be assigned to a variable.
let rttResult = Debug.rttFinish();

Result (example code with common methods):

.rttAverage(codeContainer, cycles, [name], [timeEachIteration]) ⇒ number API

Run-time testing (RTT). Calculates the average execution time of some code (in milliseconds).

  • Displays the calculated value in the console.
  • Returns the calculated value.
Debug.rttAverage(someCode, 3, 'The average execution time of some code.', true);
// Or, the result of the method can be assigned to a variable.
let averageResult = Debug.rttAverage(someCode, 3, 'The average execution time of some code.', true);

Result (example code with common methods):

.stopExec() API

The method stops execution of the utility. This method returns nothing.

.resumeExec() API

The method resumes execution of the utility. This method returns nothing.

Debug.stopExec();
// The application code between these methods will be executed.
someCode(); // This code will be executed.
// Utility methods, on the contrary, will be ignored.
Debug.log('This method will be ignored.');
Debug.resumeExec();

Client methods

.popup() API

Displays debugging information in the list in a pop-up message in the browser window. This method returns nothing.

const someVariable = +100500;
Debug.popup(someVariable);

Result (example code with client methods):

.popupReset() API

Clears the list in a pop-up message. This method returns nothing.

Debug.popupReset();

Result (example code with client methods):

.show() API

A universal method for displaying debugging information. Outputs either to the console or to a pop-up message. The output direction is controlled via the configuration (parameter showOutputDirection). By default, the information is displayed in a pop-up message. This method returns nothing.

const someVariable = +100500;
Debug.show(`Using the "show()" method: ${someVariable}`);

Result (example code with client methods):

.observer() API

Displays debug information in a fixed field in a pop-up message. This method returns nothing.

const someStatus = true;
Debug.observer(`Some status: ${someStatus}`);

Result (example code with client methods):