mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add function docs
This commit is contained in:
parent
1fd4fbc299
commit
5e9195ab99
@ -1473,7 +1473,14 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Converts the current node selection to an exportable JSON Object
|
* Converts the current node selection to an exportable JSON Object
|
||||||
**/
|
* @param {Array<Node>} set the node selection to export
|
||||||
|
* @param {Object} options
|
||||||
|
* @param {Record<string, boolean>} [options.exportedIds]
|
||||||
|
* @param {Record<string, boolean>} [options.exportedSubflows]
|
||||||
|
* @param {Record<string, boolean>} [options.exportedConfigNodes]
|
||||||
|
* @param {boolean} [options.includeModuleConfig]
|
||||||
|
* @returns {Array<Node>}
|
||||||
|
*/
|
||||||
function createExportableNodeSet(set, {
|
function createExportableNodeSet(set, {
|
||||||
exportedIds,
|
exportedIds,
|
||||||
exportedSubflows,
|
exportedSubflows,
|
||||||
@ -1561,9 +1568,13 @@ RED.nodes = (function() {
|
|||||||
return nns;
|
return nns;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the Flow JSON for the current configuration
|
/**
|
||||||
// opts.credentials (whether to include (known) credentials) - default: true
|
* Converts the current configuration to an exportable JSON Object
|
||||||
// opts.dimensions (whether to include node dimensions) - default: false
|
* @param {object} opts
|
||||||
|
* @param {boolean} [opts.credentials] whether to include (known) credentials. Default `false`.
|
||||||
|
* @param {boolean} [opts.dimensions] whether to include node dimensions. Default `false`.
|
||||||
|
* @returns {Array<Node>}
|
||||||
|
*/
|
||||||
function createCompleteNodeSet(opts) {
|
function createCompleteNodeSet(opts) {
|
||||||
var nns = [];
|
var nns = [];
|
||||||
var i;
|
var i;
|
||||||
@ -2990,6 +3001,12 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the module list for the given nodes
|
||||||
|
* @param {Array<Node>} nodes the nodes to search in
|
||||||
|
* @returns {Record<string, string>} an object with {[moduleName]: moduleVersion}
|
||||||
|
*/
|
||||||
function getModuleListForNodes(nodes) {
|
function getModuleListForNodes(nodes) {
|
||||||
const modules = {}
|
const modules = {}
|
||||||
nodes.forEach(n => {
|
nodes.forEach(n => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user