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

linkmapviz

v1.0.1

Published

Visualize where the bytes in your binary came from, as a treemap of a wasm-ld or Apple ld linker map

Readme

linkmapviz

npm license

Minimal viewer for linker map files. Upload a .map or gzip-compressed .map.gz file to see binary size as a D3 treemap grouped by object file and symbol.

Two formats are supported, detected from the file's own contents:

| Linker | How to produce a map | | --- | --- | | wasm-ld | -Wl,-Map=output.map | | Apple ld (ld64, ld-prime) | -Wl,-map,output.map, or Xcode's LD_GENERATE_MAP_FILE=YES with LD_MAP_FILE_PATH |

The demo includes a JavaScriptKit Basic example linkmap (public/samples/javascriptkit-basic.map.gz, 19 MB → 1.2 MB gzipped).

Live demo: https://kateinoigakukun.github.io/linkmapviz/

https://github.com/user-attachments/assets/e3072cb7-a254-42b2-8b1a-c500911ca246

CLI

The linkmapviz command renders a linker map as a single, self-contained HTML file. No server needed, just open it in a browser:

npx linkmapviz output.map              # writes output.html
npx linkmapviz output.map -o report.html

Development

npm install
npm run dev

Build

npm run build         # the playground, into dist/
npm run build:report  # the report template the CLI fills in, into dist-report/
npm run build:cli     # the parser the CLI runs in Node, into dist-cli/
npm run preview

Tests

npm test          # unit tests (Vitest)
npm run test:e2e  # browser tests (Playwright)

Releasing

Bump the version, then push a matching v tag:

npm version patch   # or minor / major
git push --follow-tags

Linkmap formats

Both parsers normalise to the same shape, so everything downstream (the path tree, the treemap, the symbol drawer) is format-agnostic. parseLinkmap picks the parser; there is no setting.

Object names are taken from the path basename with a trailing .o stripped. Archive members are named after the member rather than the archive, so libFoo.a(Bar.o) reads as Bar. No language- or toolchain-specific path rewriting is applied.

wasm-ld

A column layout, one row per section and per symbol:

    Addr      Off     Size Out     In      Symbol
       -        8     6240 TYPE
       -   146bf9       20         /path/to/object.o:(symbol_name)

Apple ld

Four labelled sections. Symbols reference an object file by its index in the table above them, and a symbol's section is resolved from the address ranges in # Sections:.

# Path: /path/to/binary
# Arch: arm64
# Object files:
[  1] /path/to/foo.o
# Sections:
# Address	Size    	Segment	Section
0x100004000	0x00001000	__TEXT	__text
# Symbols:
# Address	Size    	File  Name
0x100004000	0x00000100	[  1] _$s3Foo3BarV

Symbols listed under # Dead Stripped Symbols: are excluded. The linker removed them, so counting them would overstate every total. And the Mach-O leading underscore is stripped from symbol names, which is what lets Swift's $s prefix reach the demangler.

License

MIT