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

sv-aloha

v0.0.9

Published

Lightweight client-side modular web framework

Readme

sv-aloha

Installation

npm install sv-aloha
  1. copy js files from sv-aloha/client to your public folder

  2. add jquery and sv.js reference to your html document

Define simple controller

Add sv-controller attribute to any html tag on your html page

<div sv-controller="mycontroller">
</div>

Add controller definition in your js file

SV.controller('mycontroller', function(el) {
    console.log("controller instance created for element " + el);    
});

Events

Fire event

To raise controller event your can use the following

SV.controller('mycontroller', function(el) {
    ...
    SV.fire(el, "myEventType", {someField: "anyValue"});
    ...
});

this event will be processed by closest parent controller in DOM subscribes this event type

this.on = {};
this.on["myEventType"] = function(data, next) {

    if (data.someFiled === "anyValue") {
        console.log("got it");
    } else {
        next();
    }    
}

Method next() routes event to next parent controller in DOM

Emmit event

If event should be handled by all controllers in any DOM branches and level SV.emmit can be used Like this:

SV.emmit("eventType", {someField: "anyValue"});

Emmit / Fire example:

<script> 
    SV.controller('c1', function(el) {
        this.on = {};
        this.on["e1"] = function(data, next) {
            console.log("c1: " + data);    
        }
        this.on["e2"] = function(data, next) {
            console.log("c1: " + data);    
        }
    });
    SV.controller('c2', function(el) {
        this.on = {};
        this.on["e1"] = function(data, next) {
            console.log("c2: " + data);
            if (data == 1) next();
        }
    });
    SV.controller('c3', function(el) {
        SV.fire(el, "e1", 1);
        console.log("---");
        SV.fire(el, "e1", 1.1);
        console.log("---");
        SV.fire(el, "e2", 2);
        console.log("---");
        SV.emmit("e1", 1.2);
    });
</script>

<div sv-controller="c1">
    <div sv-controller="c2">
        <div sv-controller="c3"></div>
    </div>
</div>

will produce the following in js console:

c2: 1
c1: 1
---
c2: 1.1
---
c1: 2
---
c1: 1.2
c2: 1.2

Click events

to be defined

DOM modification

to be defined

Async HTTP calls

to be defined