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

m9lib

v0.3.3

Published

### A collection of Vue components

Readme

m9lib

A collection of Vue components

This collection... well, there's only one component so far.

Overview

  • It's all Vue 3 and TypeScript.
  • Components are styled using Bootstrap 5.
  • More to come! Maybe. Most definitely. Yeah.

Getting Started

Install
pnpm install m9lib
pnpm install bootstrap
Usage
<template>
    <VueSelect
        :id="'exampleOne'"
        :options="options" 
        v-model="model" 
        @on-text-change="onTextChange"
        :filter="modelFilter"
        :format="modelFormat" 
        :allowable-keys="keys"
        :is-valid="false"
        :placeholder="'Search Here...'"
        :row-height="'30px'"
        :display-line-count="3"
        ></VueSelect>
</template>
<script setup lang="ts">
import { ref, watch } from "vue"
import { VueSelect } from "mg9lib"
import type { FilterFunction, FormatFunction } from "mg9lib";

// our demo model type
type TestModel = {
    name: string
    key: string
}

// our array of demo options
const options = ref<TestModel[]>([
    { key: "ABC", name: "The Kids"},
    { key: "DEF", name: "Loss of Hearing"},
    { key: "GHI", name: "Do It Like Ghengis"},
    { key: "JKL", name: "Wasn't Assassinated"},
    { key: "MNO", name: "Smallish Fish"},
    { key: "PQR", name: "French Stowaways"},
    { key: "STU", name: "Mr. Little"},
    { key: "VWX", name: "Zombie Apocalpyse"},
    { key: "YZ0", name: "End of Times"},
    { key: "BCD", name: "All The Dope"},
    { key: "EFG", name: "French Towers"},
    { key: "HIJ", name: "Ossama Bin Ladin"},
    { key: "KLM", name: "Secret Service"},
    { key: "NOP", name: "That's Right, I Ain't"},
    { key: "QRS", name: "Gay Republican Army"},
    { key: "TUV", name: "Recreational Tank Car"},
    { key: "WXY", name: "I Asked the Same Question"},
    { key: "Z00", name: "Future Animal Farm"},
])


const model = ref<TestModel>()
const inputText = ref("")

// If we want to restrict what keyboard input we'd
// include this here. Any empty array allows all input.
const keys: string[] = []

// The function that filters the drop down list based on
// keyed input.
const modelFilter: FilterFunction<TestModel> = (option: TestModel, text: string): boolean => {
    return option.name.includes(text) || option.key.includes(text) 
}

// The function that formats the model type in the drop down display,
// as well as what is populated in the input box upon selection.
const modelFormat: FormatFunction<TestModel> = (option: TestModel): string => {
    return `${option.key}: ${option.name}` 
}


// Let's watch what happens when the model is updated
watch(model, (newValue) => {
    console.debug("selected option changed:")
    console.debug(newValue) 
})

// Oh yeah, and let's also capture changes in the keyed input.
const onTextChange = (text: string) => {
    console.debug(`keyed input: ${text}`)
}
</script>