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-astro-filter

v1.0.0

Published

Node-RED node for filtering messages based on astronomical events (solstices and equinoxes)

Readme

Node-RED Astronomical Event Filter

A Node-RED node that filter messages based on proximity to astronomical events (solstices and equinoxes).

Features

Astro Filter Node

  • Filters messages based on whether the current date is within a specified range related to an astronomical event
  • Supports all four major astronomical events:
    • March Equinox (Spring in Northern/Autumn in Southern Hemisphere)
    • June Solstice (Summer in Northern/Winter in Southern Hemisphere)
    • September Equinox (Autumn in Northern/Spring in Southern Hemisphere)
    • December Solstice (Winter in Northern/Summer in Southern Hemisphere)
  • Configurable date range (start offset and end offset)
    • The range accepts start and end offsets that are both negative or both positive, in which case the event date itself won't be included, but just used as a reference
    • The most commom use is negative start offset and positive end offset
  • There's no need to send the date to the input, the node uses the system date
  • The node adds an astroDiff attribute to the msg.payload, wich is the difference in days from current date to the event date
  • There's an option to populate astroDiff as an absolute value (always positve)
  • Visual status indicator showing whether the current date is in range and the range itself
  • Compatible with Node-RED 3.0+

Example

Usage Example

Installation

From Node-RED

The latest stable version is always available on npm for direct download from the Node-RED palette manager.

Using npm

cd ~/.node-red
npm install node-red-contrib-astro-filter

Manual Installation

  1. Create the .tgz package file using the release.sh script
  2. Place it in your Node-RED user directory (typically ~/.node-red)
  3. Run the following command:
    cd ~/.node-red
    npm install ./node-red-contrib-astro-filter-1.0.0.tgz
  4. Restart Node-RED

Usage

Astro Filter Node

  1. Add the "astro filter" node to your flow
  2. Configure the node:
    • Select the astronomical event (March Equinox, June Solstice, September Equinox, or December Solstice)
    • Set the start offset and end offset to define the date range in relation to the event selected
  3. Connect the node to your flow

The node will compare the current system date to specified range. If the date falls within the range, the message will pass through; otherwise, the flow will stop at this node.

Technical Details

This node uses the astronomy-engine library for precise astronomical calculations and moment-timezone for date operations.

License

MIT