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

hubot-destined

v0.1.4

Published

Destiny item search for hubot

Downloads

8

Readme

hubot-destined

Destiny item search for slack-integrated hubot. Uses a raw feed acquired from Josh Hunt's destiny.plumbing and provides item links to destinydb.

It will likely grow over time and may not always use the same data source or only link there, but hey, gotta start somewhere.

Use

The commands presently support refreshing data (use very sparingly) and search for an item by name/name fragment:

hubot find invect
hubot link conspiracy theory
hubot refresh data

The search is case insensitive and technically using regex. Get fancy and you'll probably blow something up or get nothing back.

Installation

In hubot project repo, run:

npm install hubot-destined --save

Then add hubot-destined to your external-scripts.json:

[
  "hubot-destined"
]

Technical notes

How it gets/stores data

This is pulling the raw JSON file for the full item list* and then creating/refreshing a local NeDB file. This could be the worst idea ever but I had stuff I could borrow from other projects to throw this together quickly and I only had a few hours to spend on it. It only does automatically the first time.

  • The processed feeds don't have the latest weapons or gear. I have no idea why. Instead of pestering Josh Hunt who already did us all a solid, I just use the raw feed he has also made available as JSON.

How it processes commands

So uh, at first glance a lot of this probably seems like overkill. I'm using another of my hubot project's structure partly because it was there, partly because it's easier to test and partly because I plan to add more stuff over time and I prefer this.

Hopefully that doesn't make it hard for anyone with time/interest to contribute to.

The command.js file is a hash of command names with an array of patterns that will activate that command. When a match is found, the command that defined the match is invoked in processor where the matching function is always passed the hubot response object and then any captured groups from the pattern in order they appeared in the pattern.

Contributing

I'd like to think I'll get to add more stuff myself, but hey, it's free software and I have a lot of other stuff going on. So if you can JavaScript, <3 Destiny and want more features/fixes - quickest path to those is contributing.

Please be sure to add at least one test to cover any new commands. Even with that, I often screw up regex by making the matches too broad and hubot ends up trying to be helpful when you least expect.