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-boolean-logic-plus

v0.1.5

Published

AND/OR/XOR boolean logic across a fixed number of topics, with a second output reporting which topics currently hold true.

Downloads

937

Readme

node-red-contrib-boolean-logic-plus

AND/OR/XOR boolean logic across a fixed number of distinct topics - the same behaviour as the original node-red-contrib-boolean-logic, with a second output added that reports the current true/false breakdown across every configured topic.

This is an independent implementation matching the documented behaviour of the original, not a fork of its source, released separately under Apache-2.0.

Install

npm install node-red-contrib-boolean-logic-plus

Or use Manage Palette in the Node-RED editor.

Usage

Configure:

  • Operation - And / Or / Exclusive Or
  • Number of topics - how many distinct msg.topic values to expect
  • Topic - the topic set on outgoing result messages
  • Invert - flip the final result (AND->NAND, OR->NOR, XOR->XNOR)
  • Name - optional

Feed it messages with different msg.topic values. It waits until it's seen a value for every configured topic at least once, then re-evaluates and outputs on every subsequent message. If a distinct topic beyond the configured number ever arrives, it resets silently (no output) and waits for a fresh full set.

Output 1: result

{ topic: "result", payload: true }

Reflects Invert if enabled - this is the final result.

Output 2: true/false breakdown

An object listing which configured topics currently hold true and which hold false - always the raw states, regardless of Invert:

{ topic: "result", payload: { true: ["D", "E"], false: ["A", "B", "C"] } }

Only sent when the breakdown actually changes from the last time it was sent - not on every evaluation, and not merely because the boolean result on output 1 flipped while the underlying topics stayed the same.

Node label

Shows the operation and topic count, e.g. OR [2] - with your Name appended in brackets if you've set one, e.g. OR [2] (garden lights).

Status

Shows a dot colored green (true) or red (false), with the matching group listed first: true: D, E. false: A, B, C when the result is true, or false: A, B, C. true: D, E when it's false. Either group is omitted if empty. While still priming: 3 of 4 topics received: A, B, C - so you can see exactly which topic is missing, not just the count. After a reset: unknown.

Value conversion

Booleans are taken as-is. Numbers: 0 is false, anything else is true. Strings that parse as a decimal number follow the same rule; the string "true" (case-insensitive) is true; anything else is false.

Exclusive Or with more than 2 topics

Matches the original: true only when exactly one topic is currently true - not "an odd number are true". With 3+ topics all true, XOR is false, same as the original.

License

Apache-2.0