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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hookly.js

v0.9.2

Published

Realtime communication with anything.

Downloads

3

Readme

hookly.js

####Hookly funnels messages to your front-end application in realtime.

Receive realtime messages sent from anywhere For example, after successful update to data, show changes to the other collaborators. Upon completion of background work update the UI with the result. Deliver webhooks to your client-side javascript application.

Build Status
Circle CI

##Installation

via npm

npm install hookly.js

via bower

bower install hookly.js

#Getting Started

####Start with an working example and build from there

  1. Connect with your Project token - (called token).
hookly.start('{{token}}');
  1. Publish a new message to a channel - realtime updates when the name changes
hookly.notify('#updates', { id: 1538, name: 'New name' })
  1. Listen for messages published to a specific channel - show changes live
hookly.on('#updates', function(data) {
  // data is { id: 1538, name: 'New name' }
});

Advanced Setup

Send updates to specific user

  1. When your user is logged in, add their user identifier (called uid).
hookly.start('{{token}}', '{{uid}}');
  1. Send a message from the current user to another (who is identified by 5a4f67)
hookly.notify('#updates', '5a4f67', { id: 1538, name: 'New name' }

Testing

Send and receive messages without making external connections

  1. Start hookly with an explicit URL (that will points to nothing)
hookly.start('{{token}}', null, 'http://localhost:3000')
  1. Leave all of your other channel listening code alone

  2. Send a message to your channel listeners explicitly call the hookly adapter with a payload

  • Send a slug as the channel
  • Send a body as the object to pass to the channel listener
  • Send a kind of 'local'
hookly.adapter.call(JSON.stringify({slug: '#updates', body: {id: 5}, kind: 'local'}))