npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details


  • User packages



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.


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




Creates a SVG element using D3v4.





d3-rs-svg is a component for creating a SVG 1.1 root element that is compatable with the D3 margin convention. This component is dependent on D3 v4 (Alpha).


Circle CI

UMD from //



<script src="//"></script>
	var svg = d3_rs_svg.html();


import * as svg from "@redsift/d3-rs-svg";
let eml = svg.html();

If using rollup.js for a browser target, ensure d3-rs-svg is part of the global map.


var svg = require("@redsift/d3-rs-svg");
var eml = svg.html();

By convention, the SVG element is meant to be hosted in a HTML node, hence svg.html()


Name|Description|Transition ----|-----------|---------- width,height|SVG viewport size, px|Y scale|SVG scaling factor, floating point|Y margin|margin convention, Object or integer px|Y classed|SVG custom class|N style|SVG CSS embed|N background|Rect background color|Y title||N role||N

Parameters that support transition can be animated and chained.'#elm')
	.call(svg)					// draw the SVG at default (1x) scale
	.call(svg.scale(2.0))		// scale the SVG by 2x
	.call(svg.scale(1.0))		// bounce back after 333ms

Note, this form of chaining does not work for parameters that do not support transition. Use the on('end', ... event for them.

var el ='#elm')
	.call('rect{fill: yellow;}'));
  	.append('rect')				// add a rect to the SVG we can paint with CSS
    	.attr('width', svg.childWidth())
    	.attr('height', svg.childHeight());

el.transition().delay(1000).duration(0).on('end', function() {
      	.call(svg.scale(2.0).style('rect{fill: green;}'));	// this green is applied after 1s of delay but 500ms before the scale changes

Accessible features

This module implements some of the features described here.