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

rm_discovery

v1.0.0

Published

Discovery is a tool that collects the information about devices within a network, sanitizes and structures it, and makes it available from a centralized location (RM). The data will stay up-to-date as the Discovery tool will regularly scan the network and

Readme

Discovery

Discovery is a tool that collects the information about devices within a network, sanitizes and structures it, and makes it available from a centralized location (RM). The data will stay up-to-date as the Discovery tool will regularly scan the network and look for the changes made to those devices. It can locate new devices connected to the network as well as identify the disabled/removed devices. Moreover, it can also recognize missing or additions of internal hardware (ex: cards and ports).

Use Case

Inventory

Discovery addresses the tedious problem of manually performing the Audits by automating the searching process. Instead of physically digging through the lab/screenshoots, Discovery takes a Serial Number as input, which is searched for in the Discovery created DB, and returns the location of the match.
This feature is available through the current RM GUI. Using the search bar on the top of the dashboard, a user can query all the assets.

Format for query

@propertyName=propertyValue @propertyName2=propertyValue2

Using the above format, a serial number can queried. For ex: @Serial Number=001289379123-6322

RM assets

RM is a resource tracking and reservation tool that requires users to manually enter the data; however, Discovery scans for the same data automatically, thus could be an important integration for RM. Letting Discovery handle the RM data has multiple benefits:

  • Reduce the chances of Human Error in the data entered
  • Contain 3x more data about each device than the current version as well as 2x the number of devices
  • Improve the format and structure of the data
  • Provide Updated information due to it's daily scanning feature

How it works?

  • Begins by looping through each IP in the subnet
  • If the IP is not discovered from previous searches (meaning IP doesn't exist in DB), then it attempts to discover the device at that node
    • According to the current progress, Discovery, firstly, assumes the device is a NTO and attempts to connect to the NTO API using that IP
    • If the connection is successful, then it pulls data from several APIs, sanitizes the information, put's it in a presentable format, and pushes it to the DB.
    • However, if the connection is unsuccessful, then Discovery assumes the device is a TG and attempts to connect it through TCL
    • Upon successful connection, it executes a series of command to get all the information required, puts it in a presentable format, and pushes it to the DB.
    • If connection is rejected, then Discovery skips the IP and performs no actions.
  • If IP is already discovered prior, then Discovery attempts to update the information
    • Instead of doing a trial and error to identify the type of the machine, Update process already knows that
    • Disocvery gets a copy of the device with the current configuration, then performs a side by side comparison with the one from DB, and writes the changes to DB.

How to use it?

# go the Discovery directory
cd Discovery

# install dependencies
npm install

# run the app
node app.js

Configuration

There are two ways to use the Discovery tool.

  • To perform a complete search of the network and add all the devices found to the DB, following command is used
discovery.discover(db)

discovery is a reference to the DiscoveryManager.js and discovery is method that takes the DB reference and performs the cycle.

  • In order to individually discover devices, following command is used
discovery.init(db)
discovery.test(ip='', write=true)

discovery.init(db) needs to be executed onces before doing testing on individual IPs
discovery.test takes the IP as it's first parameter and a boolean value as second. The boolean value signifies if the data wants to be written to the DB (true-Yes, false-No)

In app.js, subnet='' needs to be set to whatever subnet is being scanned.