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

handbid

v0.0.77

Published

Library to connect to an auction in Handbid.

Readme

#Handbid-Js

I am the Handbid library. I work in both nodejs && in the browser. I rely on chai for my tests. To be honest, I've never run any unit tests in the browser, someone should figure out how to do that. =)

##Lifecycle Connecting to an auction in Handbid is a multi-step process. It's pretty simple though, here is a breakdown:

  1. Instantiate new Handbid instance: var hb = new Handbid()
  2. Connect to the main server by invoking: hb.connect();
  3. Connect to any auction by key by invoking: hb.connectToAuction('any-auction-key');
  4. Listen for auction connection: hb.on('did-connect-to-auction', function (e) { console.log(e.get('auction')); });

You can invoke connectToAuction() immediately after connect() (you don't have to wait for the main connection to be established).

##Examples Here are some code samples to get you started!

###Nodejs

$npm install handbid

var Handbid = require('handbid'),
    hb      = new Handbid();

hb.connect();
hb.connectToAuction('auction key');

//from this point it's exactly the same as the browser examples.

###Browser


<script type='text/javascript' src='https://handbid-js-handbid.netdna-ssl.com/handbid.js'></script>

<script type="text/javascript">

    /**
     * From the browser, a few operations are automatically performed for you. They are as follows:
     *
     * window.handbid = new Handbid();
     * window.handbid.connect();
     *
     * So, automatically, you will be connected to the main Handbid server. But, you will not be able to listen in on any
     * fancy update events. For
     */
    handbid.connectToAuction('handbid-demo-auction');
    handbid.on('did-connect-to-auction', function (e) {

        var auction = e.get('auction');

        auction.on('did-update-item', function (e) {

            var itemKey = e.get('key'),
                changes = e.get('changes');

            console.log('the following was changed:', changes, 'on item with key:', itemKey);

        });

        auction.on('did-update', function (e) {

            console.log(e);

        });

    });


</script>

###Authentication

##Events Under each event name is a description of the data passed with the event. This event is the single object passed to a listener of any event.


hb.on('did-connect-to-server', function (e) {

    console.log(e.data); //will output everything in the event
    console.log(e.get('url')); //use this rather than e.data.url because get() allows for a default value

    if(e.get('anything', false)) {


    }

});

Handbid

  • did-connect-to-server: when a server connection is made after invoking hb.connect()
    • handbid: instance that dispatched the event
    • url: the url we connected to
  • did-connect-to-auction: dispatched after hb.connectToAuction('auction-key')
    • handbid: instance that dispatched the event
    • auction: the auction we connected to
  • did-receive-message: whenever the current user gets a message
    • message: text of message that was sent
  • error: anytime any error occurs

##Handbid API

  • `

##Connect Button Throwing in a connect button is wicked easy!


<a href="#" data-handbid-connect data-handbid-pass="http://mywebsite.com/where/on/success" data-handbid-fail="http://mywebsite.com/where/on/fail">
    <img src="assets/btn-hb-blue-big.png" />
</a>