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

public-choice

v0.0.9

Published

Voting / Polling Web Component

Downloads

17

Readme

Published on webcomponents.org

public-choice Web Component

Preliminary public polling web component. Do Not Use In Production.

Demo

Markup for Demo:

  <div>
      <public-choice-jsonblob guid="951c3b69-3e16-4f62-915b-ba3ca33a8e78">
        <span slot="question">Rational choice theories of politics</span>
        <datalist slot="options">
          <option value="Assumes that individuals are naturally irrational and so should not be given a choice in important political decisions"></option>
          <option value="State that only humans are rational and therefore non-humans are not appropriate subjects of politics"></option>
          <option value="Assume that political parties and voters have the utility-maximizing characteristics of actors in the economic sphere"></option>
          <option value="Assume that voters tend to vote for parties based on the charisma of the party leader"></option>
        </datalist>
      </public-choice-jsonblob>

      <public-choice-jsonblob guid="0a924568-fcb7-4387-ae85-91a6fa41f789">
          <span slot="question">'If Option 1 is ranked higher than Option 2, then removing Option 3 should not alter the relative rankings of Options 1 and 2', this is the definition of which property of fairness?</span>
          <datalist slot="options">
            <option value="IIA"></option>
            <option value="Pareto Efficiency"></option>
            <option value="No Dictators"></option>
            <option value="None of These"></option>
            <option value="All of these could be correct."></option>
          </datalist>        
      </public-choice-jsonblob>


      <public-choice-jsonblob guid="d1b5f984-9216-4076-8ba1-36ad54edbc07">
          <span slot="question">Three sets of voters pick between three candidates: 
            <p>30% prefer A to B to C</p>
            <p>40% prefer B to C to A</p>
            <p>30% prefer C to A to B</p>
            <p>Suppose only the first choice counts, so B wins the election.</p>
            <p>However, if C was removed, A would win the election 60% to 40%.</p>
            <p>This is an example of violation of which principle?</p>
          </span>
          <datalist slot="options">
            <option value="Unanimity"></option>
            <option value="No Dicators"></option>
            <option value="IIA"></option>
          </datalist>        
      </public-choice-jsonblob>