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 🙏

© 2024 – Pkg Stats / Ryan Hefner

luna-scanner

v1.11.0

Published

LUNA: Library Usage in Node.js Analyzer

Downloads

130

Readme

NPM version NPM downloads GitHub issues GitHub stars

☾ LUNA - Library Usage in Node.js Analyzer

Description

LUNA is a software development tool for node.js (and other javascript) projects, with a focus on libraries. The goal of LUNA is to aid developers in better understanding how libraries are being utilized in their projects.

Requirements

Usage

Inside any node.js project, run:

npx luna-scanner

After analyzing the source code, it will generate a LUNA report, which includes a visualization about the interaction between source code and libraries.

  • Drag (click and hold) the mouse to pan around or move nodes around
  • Use the mouse wheel to zoom in or out
  • Hovering over a node will display information on the bottom left and highlight connected nodes
  • Using Shift + Click on a node will lock it, so that focus remains on this node (Shift + Click node again to unlock)
  • Double Click nodes or groups in the graph or menu to collapse/expand them
  • Use the menu on the left to manipulate the graph:
    1. Adjust the scale of the graph / space between nodes
    2. Adjust the layout of the graph / position of the nodes
    3. Hide a selection of nodes (representing libraries or files)
    4. Highlight a selection of nodes (representing libraries or files)
  • Hover your mouse above menu items to find more information about their functionality

Configuration

Via package.json (defaults):

{
   ...
   "luna": {
      "debug": false,            // toggle debug mode
      "components": {            // toggle components of LUNA
         "callGraph": true,      // detection of function calls within files
         "dependencyTree": true, // detection of dependency chains
         "libraryAPI": true,     // detection of used API of libraries
      },
      "ignore": [],              // array of glob patterns for LUNA's scanner to ignore
   },
   ...
}

Via command line arguments (limited):

npx luna-scanner [path_to_project] [debug]

Known Issues

  • The library used to handle collapsing and expanding of nodes may break in some situations. Best to avoid excessive collapsing/expanding.

Feedback

Much appreciated! I encourage you to use my feedback form.