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

froh.js

v0.0.1

Published

Simple to use frontend javascript framework

Readme

Froh is an easy to use, data oriented and component based javascript frontend framework.

Beginner tutorial

1) The key-value store

You can save Froh.set('key', obj) every kind of data. And you can fetch that data Froh.get('key') from anywhere in your whole project. The main feature of this framework is that you can also listen on changes of that object, no matter how deep that change happens.

Example

Froh.set('serverlist', ['http://google.com', 'http://web.com', 'http://rothf.de']);

Froh.on('serverlist', function(){
    console.log('Serverlist has been changed');
}

Froh.get('serverlist')[1] = 'http://facebook.com';
// console out: Serverlist has been changed

Now every change on that object will be tracked and the cb function will be called.

2) Create a component

First of all you can write a Froh component that has to implement the function html(). This function will be called by a render() method automatically to redraw your defined component if you want so.

class WebsiteList extends FrohComponent {
    html() {
        return `<ul><li>${(Froh.get('websites') || []).join(`</li><li>`)}</li></ul>`;
    }
}

3) Froh.ready()

Wait for Froh to be ready, you know that from jQuery...

 Froh.ready(function () {
    ...
 }

4) Go for it

Instantiate your component and attach your data to the Froh storage.
With Froh.on(...) you can add a listener function that will be called every time when the value of the key will be modified or overwritten. Your FrohComponent also needs a place within the html document. If you pass a tag, or just the tagname of that html element Froh automatically shows the component within that html tag.

<!doctype html>
<html lang="en">
<head>
    <title>Title</title>
    <script type="application/javascript" src="Froh.js"></script>
    <script type="application/javascript">
    
         class WebsiteList extends FrohComponent {
          html() {
            return `<ul><li>${(Froh.get('websites') || []).join(`</li><li>`)}</li></ul>`;
          }
        }
        
        Froh.ready(function () {
            var websites = new WebsiteList('<websites>');

            Froh.set('websites', ['http://google.de', 'http://amazon.de', 'http://myapp.js']);
            Froh.on('websites', function(){
                websites.render();
            });
            
            // Every modification on the stored object 'websites' will trigger the rerendering.
            Froh.get('websites')[1] = 'http://web.de';
        });
    </script>
</head>
<body>
<websites/>
</body>
</html>