open-index/open-npm huggingface dataset:
npm package: @node-red/editor-api
Description: @node-red/editor-api ====================
Latest version: 4.1.8

@node-red/editor-api
====================

Node-RED editor api module.

This provides an Express application that can be used to serve the Node-RED
editor.


### Source

The main Node-RED modules are maintained as a monorepo on [GitHub](https://github.com/node-red/node-red).
npm package: @node-red/editor-client
Description: @node-red/editor-client ====================
Latest version: 4.1.8

@node-red/editor-client
====================

Node-RED editor resources module.

This provides all of the client-side resources of the Node-RED editor application.

### Source

The main Node-RED modules are maintained as a monorepo on [GitHub](https://github.com/node-red/node-red).
npm package: @node-red/flow-parser
Description: Parser Utility for Node-RED Flow JSON
Latest version: 1.0.2

@node-red/flow-parser
---

This module provides a set of utilities for working with Node-RED flows.


## Usage

```
const fs = require("fs");
const { parseFlow } = require("@node-red/flow-parser");

// Load the flow json from a local file and parse to an object
const exampleFlow = JSON.parse(fs.readFileSync("flows.json", "utf-8"));

// Parse the flow
const flow = parseFlow(exampleFlow);

// `flow` is now an object that can be used to explore the flow structure
```


### Example - `walk`

The `walk` function can be used to invoke a function on every object in the flow
configuration in a reasonably well-defined order:

 - Subflow definitions
   - Config nodes scoped to this subflow
   - Groups
   - Nodes
 - Global Config nodes
 - Flows
   - Config nodes scoped to this flow
   - Groups
   - Nodes

```
const fs = require("fs");
const FlowParser = require("@node-red/flow-parser");

// Load the flow json from a local file and parse to an object
const exampleFlow = JSON.parse(fs.readFileSync("flows.json", "utf-8"));

const flow = FlowParser.parseFlow(exampleFlow);

flow.walk(function(obj) {
    switch(obj.TYPE) {
        case FlowParser.types.Flow:
            // A flow object
            break;
        case FlowParser.types.Subflow:
            // A subflow definition
            break;
        case FlowParser.types.Group:
            // A group object
            break;
        case FlowParser.types.ConfigNode:
            // A config node
            break;
        case FlowParser.types.Node:
            // A flow node
            break;
    }
})

```

### Example - `export`

The `export` function gives back the JSON array for the flow.

The following example will disable all Debug nodes in the flow:

```
const flow = parseFlow(exampleFlow);

flow.walk(obj => {
    if (obj.type === 'debug') {
        obj.active = false;
    }
});

const newFlow = flow.export();
```
npm package: @node-red/library-file-store
Description: A File Store Library plugin for Node-RED
Author: Nick O'Leary
Latest version: 1.0.0

# Node-RED Library File Store Plugin

**Requires Node-RED 1.3 or later.**


Node-RED allows you to import and export flows from a local library. The built-in
library stores its contents in `~/.node-red/lib`.

This library plugin allows you to add additional libraries in other locations.

For example, you may have a directory that is shared on the local network, or
automatically synced with a cloud service such as Dropbox.

If you are collaborating with other developers, this makes it easier to have a
shared library to store reusable flows and components.

### Installation

This module should be installed under `~/.node-red/` as you would any other
Node-RED node module.

    npm install @node-red/library-file-store


### Configuration

1. Edit your Node-RED settings file - typically `~/.node-red/settings.js`
2. Find the `editorTheme` section and add a `library` section if one does not
   already exist.
3. Under that section add a `sources` array. Within that array you can add
   as many new file store sources as you want.

    ```
    editorTheme: {
        library: {
            sources: [
                {
                    id: "team-collaboration-library",
                    type: "node-red-library-file-store",
                    path: "/Users/tom/work/team-library/",
                    label: "Team collaboration",
                    icon: "font-awesome/fa-users"
                }
            ]
        },
    }
   ```

The configuration object can have the following properties:


Property | Description
---------|--------------
`id`     | **Required** <br> A unique, url-safe, identifier for the library. Should contain only letters, numbers and the symbols `- _`.
`type`   | **Required** <br> Must be set to `node-red-library-file-store`
`path`   | **Required** <br> The absolute path to the where the library should be stored
`label`  | An optional label to use in the editor, otherwise the `id` will be used.
`icon`   | An optional icon from [FontAwesome 4.7](https://fontawesome.com/v4.7.0/icons/).
`types`  | By default the library will be used to store all types of object. It can be restricted to certain types by setting this property to an array of the acceptable types. <br> For example, to restrict it to just flows, set this property to `["flows"]`.
`readOnly` | To make this a read-only library so it can only be used to import from, set this property to `true`.
npm package: @node-red/registry
Description: @node-red/registry ====================
Latest version: 4.1.8

@node-red/registry
====================

Node-RED node registry module.

This provides the node registry, responsible for discovering and managing the node
modules available to the Node-RED runtime.

### Source

The main Node-RED modules are maintained as a monorepo on [GitHub](https://github.com/node-red/node-red).
npm package: @node-red/runtime
Description: @node-red/runtime ====================
Latest version: 4.1.8

@node-red/runtime
====================

Node-RED runtime module.

This provides the core flow engine of Node-RED. It is the main entry point for
the runtime.

### Source

The main Node-RED modules are maintained as a monorepo on [GitHub](https://github.com/node-red/node-red).