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

radiocheck

v0.0.1

Published

Dumb check box stuff

Downloads

9

Readme

What is this

This is some JS that lets you tag some checkboxes that you want to act like radio buttons. It's version 0.0.1 and I've only tried it on the latest versions of chrome, safari, and firefox. It is not production ready so use with care.

Why the **** don't you just use a radio button?

Because someone who pays you money told you it had to be a checkbox, and despite your most valiant efforts you could not convince them otherwise. They probably want to be able to select a thing that is optional, BUT if they do select it, there can only be one. ¯_(ツ)_/¯

Should I ever use this when I can just use a radio button and don't have some weird situation where I HAVE to use checkboxes?

No.

But what if...

FOR THE LOVE OF ALL THAT IS GOOD AND HOLY NO!!!!!!!!!

Usage

Use the radiocheck data attribute on a group of checkboxes that should only have one selected at any time:

<label>One</label>
<input data-radiocheck=true type='checkbox'/>

<label>Two</label>
<input data-radiocheck=true type='checkbox'/>

<label>Three</label>
<input data-radiocheck=true type='checkbox'/>

If you have a group of checkboxes that could have more checkboxes added to the group, use radiocheck_async inside of a containing element with the attribute radiocheck_async_fields. You may have multiple groups, if you need multiple groups of wannabe radio buttons.

<!-- these 2sets of fields validate independently -->
<div data-radiocheck-async_fields=true>
  <label>One</label>
  <input data-radiocheck=true type='checkbox'/>

  <label>Two</label>
  <input data-radiocheck=true type='checkbox'/>

  <label>Three</label>
  <input data-radiocheck=true type='checkbox'/>
</div>

<div data-radiocheck-async_fields=true>
  <label>One</label>
  <input data-radiocheck=true type='checkbox'/>

  <label>Two</label>
  <input data-radiocheck=true type='checkbox'/>

  <label>Three</label>
  <input data-radiocheck=true type='checkbox'/>
</div>

Dependencies

None. If it doesn't work in your browser, you're probably on IE1.