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-gatekeeper

v0.2.1

Published

A gatekeeper node to stop or allow message flow based on msg/flow/global/env/jsonata values

Readme

node-red-contrib-gatekeeper

A tiny Node-RED node that opens or closes the gate for passing messages forward.
You choose a property (from msg, flow, global, env, or a jsonata expression).
If that value is true (or the string "true"), the gate closes (message dropped).
Otherwise, the gate opens and the message continues.

status license


Features

  • ✅ Simple allow/deny logic in one node
  • ✅ Supports msg, flow, global, env, or jsonata
  • ✅ Clear status: open (green) / closed (red)
  • ✅ No external deps

Install

From your Node-RED user directory (~/.node-red):

npm install node-red-contrib-gatekeeper

Or via Manage paletteInstall → search for node-red-contrib-gatekeeper.


Usage

  1. Drag Gatekeeper into your flow.

  2. Set Property to check:

    • msg/flow/global/env: provide the property/key (e.g., payload, allow, FEATURE_FLAG)
    • jsonata: provide a JSONata expression (e.g., payload.allow = true)
  3. If the evaluated value is true or the string "true"gate closed (message not forwarded). Anything else → gate open (message forwarded).

Status

  • green dotopen (message passes)
  • red dotclosed (message blocked)
  • red ringerror

Properties

| Field | Type | Description | | ------------ | --------------------------- | ------------------------------------------------------------------------ | | Name | string | Optional label shown under the node. | | Property | msg/flow/global/env/jsonata | The value to check. If it resolves to true (or "true"), gate closes. |

Examples:

  • msg + payload → checks msg.payload
  • flow + allow → checks flow.get("allow")
  • global + feature.enabled → checks global.get("feature.enabled") (if you store an object)
  • env + FEATURE_FLAG → checks process.env.FEATURE_FLAG
  • jsonata + payload.level > 10 → evaluates expression on the incoming msg

Example flows

1) Simple boolean in msg.payload

[
  { "id":"inject1","type":"inject","name":"allow=false","props":[{"p":"payload"}],"payload":"false","payloadType":"bool" },
  { "id":"gate1","type":"gatekeeper","name":"Gate","property":"payload","propertyType":"msg" },
  { "id":"debug1","type":"debug","name":"Passed","complete":"true" }
]
  • payload=false → gate open → message passes
  • Set payload=true → gate closed → message dropped

2) JSONata condition

[
  { "id":"inject2","type":"inject","name":"payload={ level: 12 }","props":[{"p":"payload"}],"payload":"{\"level\":12}","payloadType":"json" },
  { "id":"gate2","type":"gatekeeper","name":"Level Gate","property":"payload.level > 10","propertyType":"jsonata" },
  { "id":"debug2","type":"debug","name":"Passed","complete":"true" }
]
  • Expression resolves to true → gate closed (blocked)
  • Change to payload.level > 99 → resolves false → gate open

Notes

  • The node treats boolean true and string "true" as closed; everything else is open.
  • With jsonata, the expression is evaluated against the current msg. Any exception is shown as error status.

License

MIT © AIOUBSAI