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 🙏

© 2025 – Pkg Stats / Ryan Hefner

stacklyn

v1.2.0

Published

Turn JavaScript stack traces into structured data.

Readme


Getting Started

Live demo is at https://stacklynjs.github.io/demo.

First and foremost, npm install stacklyn.
(and/or use one of the direct import methods listed below)

Here's some example usage code so you don't feel lost while I finish writing the docs:

import Stacklyn from "stacklyn";

try {
    // some risky code here that might throw an error
} catch (error) {
    // array of objects
    const parsed = Stacklyn.parse(error);

    // still an array of objects, but with source map info
    const mapped = Stacklyn.map(parsed);

    mapped.forEach(frame => console.log(frame.raw)); // log the sourcemapped stack frames
}

What we offer:

  • Stacktrace Parsing: Convert raw and hard to read stack strings into clean, structured data.
  • Stacktrace Stringification: Turn a parsed stack back into a string.
  • Stacktrace Conversion: Transform stack traces between different formats.
  • Structured CallSite Info: Directly work with static data gathered from V8 CallSite objects.
  • Source Map Integration: Map minified or transpiled stack frames back to their original source files and lines for accurate debugging.
  • Context Enrichment: Add valuable surrounding code context to each stack frame for deeper insights.
  • Error Serialization: Make error properties enumerable for easier serialization and logging.

And best of all, supports most stack trace formats you'll come across!

Stacklyn V2 will add even more cool stuff! See the roadmap to know more.

Supported Formats

  •   Chrome 3+ (V8)
  •   Node.js (V8)
  •   Electron (V8)
  •   Deno (V8)
  •   Firefox 1+ (SpiderMonkey)
  •   Safari 6+ (JSC)
  •   Bun (V8-JSC Hybrid)
  •   IE 10+ (ChakraCore)
  •   Edge Legacy (ChakraCore)
  •   Opera <15 (Linear B, Futhark, Carakan)
  •   Netscape 7+ (Mocha / SpiderMonkey)
  •   Espruino (not kidding)

[!NOTE]

"Why do the logos look old?"

They show the first version that added stack trace support.
However, all versions after the ones marked with a + are supported too.

Import Stacklyn

Stacklyn supports all kinds of imports!

  1. As an HTML script tag:
    (note: Stacklyn is automatically placed as window.Stacklyn or globalThis.Stacklyn in the global scope if you do this)

    <script src="https://cdn.jsdelivr.net/npm/stacklyn/stacklyn.js"><script>
  2. For use in JavaScript code directly:

    // 1. ES Modules
    import Stacklyn from "stacklyn";
       
    // 2. CommonJS (Node only)
    const Stacklyn = require("stacklyn");
       
    // 3. RequireJS
    require(["stacklyn"], function(Stacklyn){
        // Your usage code here
    });
     
    // 4. Web Workers
    importScripts("https://cdn.jsdelivr.net/npm/stacklyn/stacklyn.js");
    
    // You can also refer to Stacklyn once imported as:
    Stacklyn; // Direct (works regardless of how you imported)
    window.Stacklyn; // Browsers
    globalThis.Stacklyn; // Modern JS runtimes (2020+)
    self.Stacklyn; // Web workers
    global.Stacklyn; // Node.js
    // And then use the methods as usual, for example: window.Stacklyn.parse(myError);

Note that with the way stacklyn is made, it works no matter what JS env you're running!

This means even in CSP'd environments (e.g. file://), you can still parse stack traces :D
(you cannot fetch local file information, best to use localhost for that)


Roadmap

  • Docs: In progress

V2 Roadmap

  • Extension System (Stacklyn.createExtension)
  • More Stack Formats (Jsish, Boa)
    • Graal.js, Hermes, JS-Interpreter, Duktape, XS, NJS, QuickJS, and LibJS will be added to parseV8 as an environment if statement.
  • Parse Bluebird extended stack traces
  • overwrite method to change the default runtime stack format, accepts a callback function

Contributing

We welcome contributors! If you've found a bug, had a suggestion, etc. Feel free to submit an issue or PR!

License

Stacklyn is licensed under the Apache-2.0 License, the full text is at LICENSE and a portion is located under every file.