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

node-red-contrib-image-average

v0.1.2

Published

Node-RED function node that receives a valid JIMP input and outputs an array with [R, G, B] average values for the image

Downloads

79

Readme

node-red-contrib-image-average

Implements a Node-RED function node that receives a valid JIMP input and outputs an array with [R, G, B] average values for the image.

Inputs

  • source (string | buffer) : String to local file (not recommended), remote image URL or image buffer.

Outputs

  • payload (array) : RGB values of the image average.

  • stats (object) : Basic stats with pixels used and time (in secs) employed from fetch to result.

Details

The node uses, by default, the msg.payload as the source for the image average, or the source field.

The input can be a string with a path to a local file (not recommended), a remote URL address, or be an image buffer (for example fetched by the http request node).

The source field allows mustache-style tags to be constructed using values of the incoming message. For example, if the source is set to example.com/{{{topic}}}, it will have the value of msg.topic automatically inserted. Using {{{...}}} prevents mustache from escaping characters like / & etc.

Note: The node outputs the RGB values as a 3 item array in msg.payload. It also outputs a convenient msg.stats object so you evaluate the performance impact. The time (in secs) reported, consists of the combined time to fetch the image till the output is processed. Use as small an image as possible, as even small 64 x 64 pixel image can take up to a second to compute, depending on your hardware.