New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nusher

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nusher

Yet another pusher client for node.js

latest
npmnpm
Version
0.0.2-1
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Yet another pusher client for node.js

This is a (diverged) fork of Abhishiv's work at https://github.com/abhishiv/pusher-node-client, so credit to him for writing this in the first place. The main difference is that nusher is using https://github.com/hij1nx/EventEmitter2 so you could invoke onAny on a channel.

How to use it

PusherClient = require('nusher')

pusher_client = new PusherClient
  appId: (process.env.PUSHER_APP_ID or app_id)
  key: (process.env.PUSHER_KEY or pusher_key)
  secret: (process.env.PUSHER_SECRET or pusher_secret)

pusher_client.on 'connect', ->
  channel = pusher_client.subscribe('presence-users', {user_id: 'system'})

  channel.on 'success', ->

    channel.on 'pusher_internal:member_removed', (data) ->
      console.log 'member_removed'

    channel.on 'pusher_internal:member_added', (data) ->
      console.log 'member_added'

pusher_client.connect()

License

This code is free to use under the terms of the MIT license.

Keywords

pusher

FAQs

Package last updated on 16 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts