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

pickathing

v0.11.6

Published

Simple select written in Vanilla JS

Readme

pickathing

Simple select written in Vanilla JS

Just do var select = new Pickathing('your-id', true/false)

true /false is for the searchfield to show or not.

If you want multiple select it is easy! Just create normal multiple select:

<select multiple> ...

and initialization is the same as with normal select.

There is an option to filter one select by the other. To do that simply add options object as a third parameter like so:

new Pickathing('your-id', true/false, {filterAttr: 'data-filter', filter: select})

The select needs to be instance of Pickathing class.

More docs:

new Pickathing('element-id', hasSearch, options)

Parameters

element-id

(String) Id of the select you want to activate

hasSearch

(Boolean) true/false determines if the searchfield is added or not

options (optional)

(Object) key: value pairs of other options

options.filter

(Instance) Instance of already initialized Pickathing select which gets filtered BY this select

options.filterAttr

(String) Attribute for which to look when filtering another select (Has to be present if you use options.filter)

options.searchLabel

(String) Sets the placeholder in the search field

options.focusDelay

(Number) Sets delay after the search field or the first item is selected. Should match transition of opening the dropdown. If you did not change transition in CSS you do not have to change this value

options.ignoreDiacritics

(Boolean) true/false determines if the searchfield ignores diacritics or not

Methods

Pickathing.reset(fireOnChange)

Resets the filter to initial state. Accepts fireOnChange (true or false) to trigger the onChange method or not

Pickathing.onChange()

You can fire the onChange event manually with this method, or you can set what function should be executed

let select = new Pickathing(...);
select.onChange = () => {
  ...
}

By default this method is blank and does not do anything.

Events

Pickathing.onChange

By default it is blank and serves as a method as well. Fire after the select has changed its value (e.g. clicking on option). Has to be set after initialization:

let select = new Pickathing(...);
select.onChange = () => {
  ...
}