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

flowdock-ex

v1.3.1

Published

Flowdock client for NodeJS with higher level functionality

Downloads

17

Readme

Flowdock EX

It's like the flowdock module, but EXtended. It's way easier and better to use.

The module is of course made for Node.JS and should be used to completely replace your use of flowdock currently.

Features:

  • Higher level, so there's less raw data manipulation
  • Things make more sense
  • Easier to access all your client's flows, organizations, users
  • Easier to message people
    • Soon it will also be way easier to thread messages (I hate flowdock's threading API so currently don't want to deal with that PITA)
  • Easier to stream and manage streams
  • Everything uses promises rather than callbacks
  • Supports the ability to detect when you join a flow (or multiple at once)
    • Similarly, you can now automagically listen for new messages without having to do a bunch of stream manipulation on your own.
  • It's just better, use this instead of the regular flowdock module and you probably won't be sorry
    • Even if it's missing a feature, you can still access the full flowdock api (and I've wrapped the request so it uses promises instead)
    • I really dislike flowdock's API and documentation, but this module makes me not want to die when using it.

That's pretty much it.

Usage:

const { FlowdockClient } = require('flowdock-ex');

const client = new FlowdockClient({ session: MY_TOKEN });

client.init()
    .then(() => {
       client
         .stream(...Array.from(client.flows.values()))
         .on('event', ...);
    })
    .catch(console.error)

This will create a client, initialize it, and then stream all of its flows at once, then use the resulting event emitter to listen for events. Note that this is not best practice, because you won't be able to clean up the FlowStream returned by Client#stream.

Though I was too lazy for v0.0.1, stuff will eventually be documented and viewable with jsdoc, but for now just poke around and look at it. There's not a whole lot to it for the time being.

You can also use the non-babel transpiled version by requiring flowdock-ex/src rather than just flowdock-ex, if you want that minimal performance gain.

Migration from the flowdock module

If you want to use the snazzy new features without having to migrate any code, just use the session property from Client.session while you do your migration.