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 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-red-contrib-subflow2node

v0.1.0

Published

Node-RED node for converting subflow to node

Downloads

23

Readme

node-red-contrib-subflow2node

Node-RED node for packageng exported subflow JSON definition to node module

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-contrib-subflow2node

Usage

subflow2node node is a node for creating a subflow module that can be installed from manage palette menu of Node-RED editor as described documentation page([Packaging a Subflow as a module : Node-RED]). 

Since package generation with tools and/or Node-RED editor are being considered by core Node-RED project, this node is intended as a substitution until then.

The subflow2node node accepts the exported SUBFLOW JSON format data and outputs the npm package. A subflow module can be added to the palette by saving this package to a file and uploading it from the manage palette menu in the Node-RED editor.

This node also provides experimental support of flow encoding feature discussed here. Decoding key for flow should be defined by OS environment variable NR_FLOW_DECODE_KEY.

Note: A npm module created by this node uses APIs that require at least Node-RED 1.3.

Note: This node expects subflow definition exported from subflow template. Also, generated NPM package may not work for sufblow definitions with nested subflow.

Example

Import example from Inport/Examples/node-red-contrib-subflow2node.

  • 01 - generate package

    This example use a template node to define subflow json data and a file node to write package.

    Example Flow #1

  • 02 - simple Web UI

    This example flow creates a HTTP end-point at http://localhost:1880/subflow2node that provides a simple UI for subflow module generation. In this US, write subflow JSON data, readme in Markdown, and licence text. Pressing send button moves to package download page.

    Example Flow #2

    Simple Web UI

    Example Sublow Definition:

  [{"id":"921a4b1d.07bb68","type":"subflow","name":"QRcode","info":"","category":"","in":[{"x":140,"y":120,"wires":[{"id":"e563f491.e443f8"}]}],"out":[{"x":380,"y":120,"wires":[{"id":"e563f491.e443f8","port":0}]}],"env":[],"meta":{"module":"node-red-contrib-qrcode","type":"qrcode","version":"0.1.0","author":"[email protected]","desc":"Node-RED node for converting string to QRcode","keywords":"Node-RED, subflow, QRcode","license":"Apache-2.0"},"color":"#87A980","icon":"font-awesome/fa-qrcode"},{"id":"e563f491.e443f8","type":"function","z":"921a4b1d.07bb68","name":"","func":"qrcode.toString(msg.payload, (err,str) => {\n    if (err) {\n        node.error(err);\n        return;\n    }\n    node.send({payload: str});\n});","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"qrcode","module":"qrcode"}],"x":260,"y":120,"wires":[[]]}]