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

@wral/wral-election-map

v0.1.2

Published

<wral-election-map>: a public election results map. Its own artifact, separate from the elections mod.

Readme

wral-election-map

<wral-election-map>: one contest on SBOE's precinct shapes, read from the public election API (contract §37). Statewide by county; a county opens its precincts. It polls with If-None-Match and pauses while the page is hidden.

<script type="module" src="https://cdn.wral.com/elections/election-map/v0.1.2/wral-election-map.js"></script>
<wral-election-map
  api-base="https://api.wral.com/dev/election/v2"
  shapes-base="https://cdn.wral.com/elections/election-map/shapes/SBE_PRECINCTS_20260824"
  election="…" contest="…"></wral-election-map>

| attribute | | |---|---| | api-base | the public election API | | shapes-base | a published shapes directory | | election, contest | what to draw | | county | open on one county (WAKE, NEW HANOVER) | | poll | seconds between reads; 15 by default, 5 at least, 0 off |

Theming

Set these on the element (wral-election-map { --wem-bg: … }); they win over its light and dark defaults. Party colours are fixed.

| property | | |---|---| | --wem-bg, --wem-text, --wem-muted | ground, text, secondary text | | --wem-stroke | the lines between places | | --wem-none | a place nobody leads | | --wem-outside, --wem-outside-stroke | a county the race does not cover, and its outline | | --wem-border, --wem-focus | buttons, the focused place | | --wem-font | | | --wem-label, --wem-label-halo | county names, and the ring that keeps them legible | | --wem-label-on-dark, --wem-label-on-dark-halo | the same, on a dark party fill |

Selecting

A click (or Enter) fires place-select, bubbling and composed, with detail: { county, precinct }: a county statewide, a precinct inside an open county, { county: null, precinct: null } back to statewide. Choosing a county opens it unless a listener calls preventDefault(). el.selected reads the last choice.

Published paths (cdn.wral.com/elections/election-map/)

| path | cache | |---|---| | vX.Y.Z/wral-election-map.js | immutable | | shapes/<SBOE file>/counties.topojson, precincts/<COUNTY>.topojson, manifest.json | immutable |

Pages pin an exact version; there are no vX or latest aliases. Also on npm as @wral/wral-election-map.

Releasing

Bump version here, then tag election-map-vX.Y.Z (the tag must match). The pipeline builds the element and the shapes, publishes both, and publishes to npm. The mod's own vX.Y.Z tags do not release the map.

npm run build -w election-map     # dist/, with a 30 KB gzip budget
npm run shapes -w election-map    # build/shapes/, from SBOE's zip