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 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-warp

v0.1.1

Published

A node for Node-RED that can warps message directly to the specified nodes.

Downloads

87

Readme

platform npm version install size downloads downloads License JavaScript Style Guide circle-ci dependencies Status Total alerts Language grade: JavaScript Maintainability test coverage ...

node-red-contrib-warp

A node for Node-RED that can warps message directly to the specified nodes.

Installation

Use the Node-RED Manage palette option, or run the following command in your Node-RED directory (typically: ~/.node-red):

$ npm install node-red-contrib-warp

Usage

demo

Input messages

The msg.scope can be set as a comma-separated string, or an array of string.

If you choose selected nodes in the node configuration, the msg.scope property will not be used.

single

multi-comma

multi-array

Examples

These flows demonstrates the operations of the warp node and the commands that can be used to change its state.

Basic Operation

Pass the message to the selected node in the following flow:

selected


[{"id":"4a6dc584.248f5c","type":"inject","z":"f6f2187d.f17ca8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"123","payloadType":"num","x":290,"y":160,"wires":[["4cb0570.dc11ba8"]]},{"id":"4cb0570.dc11ba8","type":"warp","z":"f6f2187d.f17ca8","scope":["55d3323b.15db3c"],"destination":"selected","x":460,"y":160,"wires":[]},{"id":"55d3323b.15db3c","type":"debug","z":"f6f2187d.f17ca8","active":true,"tosidebar":true,"x":470,"y":220,"wires":[]},{"id":"4581fbf2.663664","type":"inject","z":"f6f2187d.f17ca8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":300,"y":220,"wires":[["55d3323b.15db3c"]]}]

Advanced Operation

Pass the message to the dynamically specified node in the following flow:

varmsg


[{"id":"29571f4a.bd258","type":"function","z":"f6f2187d.f17ca8","name":"","func":"const args = msg.payload\n\nif ((args.username)\n        && (typeof args.username == 'string')) {\n        \n    // ok\n    return [msg, null]\n    \n} else {\n    // missing param\n    msg.payload = {\n        checkpoint: node.id,\n        data: args,\n        message: 'Missing mandatory parameter [username].'\n    }\n    return [null, msg]\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","x":460,"y":180,"wires":[["b5785af6.8fc528"],["6ede4eb5.3b876"]],"outputLabels":["Ok","missing params"]},{"id":"e475e333.a75f8","type":"warp","z":"f6f2187d.f17ca8","name":"","scope":null,"destination":"varmsg","x":610,"y":380,"wires":[]},{"id":"a71c67d1.9612c8","type":"http in","z":"f6f2187d.f17ca8","name":"","url":"/register","method":"post","upload":false,"swaggerDoc":"","x":130,"y":180,"wires":[["f78b9a18.c581d8"]]},{"id":"d22d192c.ef3ef8","type":"http in","z":"f6f2187d.f17ca8","name":"","url":"/resume/:checkpoint","method":"post","upload":false,"swaggerDoc":"","x":170,"y":380,"wires":[["1974c92f.2ccd77"]]},{"id":"1974c92f.2ccd77","type":"change","z":"f6f2187d.f17ca8","name":"set msg.scope","rules":[{"t":"set","p":"scope","pt":"msg","to":"req.params.checkpoint","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":380,"wires":[["e475e333.a75f8"]]},{"id":"f78b9a18.c581d8","type":"function","z":"f6f2187d.f17ca8","name":"dummy","func":"// Intermediate processing...\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":180,"wires":[["29571f4a.bd258"]]},{"id":"d39ca728.e45138","type":"http response","z":"f6f2187d.f17ca8","name":"ok","statusCode":"","headers":{},"x":750,"y":160,"wires":[]},{"id":"6ede4eb5.3b876","type":"http response","z":"f6f2187d.f17ca8","name":"missing params","statusCode":"","headers":{},"x":640,"y":200,"wires":[]},{"id":"b5785af6.8fc528","type":"template","z":"f6f2187d.f17ca8","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n    \"id\": 1,\n    \"username\": \"{{payload.username}}\"\n}","output":"json","x":620,"y":160,"wires":[["d39ca728.e45138"]]}]

License

This project is released under the MIT License.