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

v1.0.1

Published

A collection of FRP nodes for Node-RED

Downloads

68

Readme

node-red-contrib-frp

A collection of Node-RED nodes that use FRP to perform stream manipulation.

frp-map

This node maps msg.payload using the specified mapping function.

Inputs

  • payload: Data inside the incoming message. Can be renamed to any variable name you prefer in the mapping function

Outputs

  • payload: Value returned by the node's mapping function.
  • topic: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.

Mapping Function

The frp-map node allows you to define the body of the internal mappingFunction. Naming the function is not necessary as it is already defined internally. The mapping function can only contain one input parameter and is required to return a value, which is stored in the message's payload.

frp-filter

This node allows incoming messages to pass through if it fulfills the criteria specified in the filtering function.

Inputs

  • payload: Data inside msg.payload of the incoming message. Can be renamed to any variable name you prefer in the filtering function.

Outputs

  • topic: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.

Filtering Function

The frp-filter node allows you to define the body of the internal filteringFunction. Naming the function is not necessary as it is already defined internally. The filtering function discerns if the data inside the message (contained in msg.payload) passes a certain criteria. Therefore, the function should have one input parameter and return either true or false. It's also important to note that frp-filter does not change the contents of the message, and only decides whether or not to pass it along.

frp-scan

This node performs a fold operation for every incoming message: it takes the value of msg.payload and runs it through the accumulator function, storing and returning an accumulated value from the first to the latest input.

Inputs

  • payload: The initial value used for accumulation.
  • payload: Data inside msg.payload of the incoming message. Can be renamed to any variable name you prefer in the accumulator function.
  • accumulatedValue: Value obtained from computing the previous message with the accumulator function. Can be renamed to any variable name you prefer in the accumulator function.

Outputs

  • payload: Contains the accumulated value obtained from the accumulator function.
  • topic: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.

Accumulator Function

frp-scan requires you to define the body of the internal accumulatorFunction. Naming the function is not necessary as it is already defined internally. The accumulator function must have two parameters: the first being accumultedValue, followed by payload. For the very first run, the seed value serves as the accumulated value, and the result is then stored and used for subsequent runs. This function must therefore return a value in order for it to work properly.

frp-combineAsArray

This node combines the msg.payload's of its inputs into an array and outputs it.

Inputs

  • input topics: A list containing the topics of the input nodes that can be reordered.

Outputs

  • payload: Contains the accumulated value obtained from the accumulator function.
  • topic: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.

frp-combineWith

This node combines the msg.payload's of its inputs into an array and outputs it.

Inputs

  • input topics: A list containing the topics of the input nodes that can be reordered.
  • payload1, payload2, ...: Data contained in the msg.payload's of the input nodes. Their order should be the same as that of input topics

Outputs

  • payload: Contains the accumulated value obtained from the accumulator function.
  • topic: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.

Aggregator Function

frp-combineWith requires you to define the body of the internal aggregateFunction. Naming the function is not necessary as it is already defined internally. The aggregator function must have as many parameters as there are input topics, and must observe the correct order. It must also return a value for it to work properly.