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

aran-lite

v0.0.4

Published

Aran and Otiluke, integrated.

Readme

aran-lite

Aran and Otiluke, integrated.

Analysis

An analysis function receives (i) an aran instance to view the source code (ii) an isomorphic http client (iii) user-defined options and should asynchronously return a (i) parsing function (ii) an Aran advice (iii) possibly a cleanup function to handle direct eval calls. The parse function should either return an estree.Program node or a falsy value, in which case the script will still be executed but not analyzed. An analysis module is a CommonJS module which exports an analysis function. For instance, the analysis module below establishes a WebSocket connection and uses it to log every binary operation performed within files named main.js

const Acorn = require("acorn");
module.exports = ({aran, antena, argm, transform}, callback) => {
  const websocket = antena.WebSocket();
  websocket.onerror = () => {
    callback(new Error("WebSocket connection error"));
  };
  websocket.onopen = () => {
    websocket.onerror = null;
    callback(null, {
      parse: (script, source) => {
        if (source.endsWith("/main.js")) {
          const estree = Acorn.parse(script, {locations:true});
          estree.source = source;
          return estree;
        }
      },
      advice: {
        eval: transform,
        binary: (operator, left, right, serial) => {
          socket.send("Performing: "+operator+" at "+aran.root(serial).source+" line: "+aran.node(serial).loc.start.line);
          return eval("left "+operator+" right");
        }
      }
    });
  };
};

Analysis API

analysis({aran, antena, argm, transform}, (error, ({parse, advice}) => { ... }));
  • aran :: aran.Aran An aran instance which should only be used to call aran.node(serial) and aran.root(serial).
  • antena :: antena.Antena: Http(s) isomorphic client.
  • argm :: {string}: User-defined arguments mapping. For aran-lite/node this will be computed from the command line arguments preceding --. For aran-lite/browser this will be computed from url search parameters statifying the prefix condition.
  • script2 = transform(script1, source) This function is invoked by the framework but the user can also invoke it to support dynamic code evaluation -- i.e.: eval calls (direct/indirect), Function calls and <script> tags insertion.
    • script1 :: string: Original script.
    • source :: number || string: The script's source.
      • number: script2 will be evaluated within a direct eval call.
      • string: Normally the user should never have to call transform with a string. For aran-lite/node, it indicates that script2 will be evaluated as commonjs node module. For aran-lite/browser, it indicates that script2 will be evaluated as global code (indirect eval call).
      • * script2 will be evaluated as global code (indirect eval call).
    • script2 :: string: Transformed script.
  • error :: Error
  • estree = parse(script, source): This function is called within transform to establish whether script should be transformed or not.
    • script :: string Original script as given to transform.
    • source :: number || string The sript's source as given to transform.
    • estree :: estree.Program || falsy A falsy value indicates that the script should not be transformed before evaluation.
  • advice :: aran.Advice An Aran advice.

require("aran-lite/node")(analysis, options)

Deploy an analysis function/module an a node process, example here.

aran-lite-node --analysis <path> [--host <host>] [--secure] <argm> -- <node-command>`
require("aran-lite/node")(analysis, {host, secure, _:[main_path, ...argv], ...argm});
  • analysis :: function: Analysis function.
  • host :: string || number: Host to which the antena should point to.
  • secure :: boolean: Indicates whether the antena should perform secure communication or not.
  • main_path :: string: Path to main module.
  • argv :: [string]: Command line arguments.
  • argm :: {string}: Mapping to pass as argm to the analysis

proxy = require("aran-lite/browser/proxy")(analysis_path, options)

Deploy an analysis module on the browser, example here.

proxy = require("aran-lite/browser/proxy")(analysis_path, {"ca-home":ca_home, "url-search-key":url_search_key});
  • analysis_path :: string: Path to an analysis module.
  • ca_home :: string: Path to a certificate authority directory.
  • url_search_key :: string Prefix to compute argm.