function convertNode(n, exportCreds) {
		exportCreds = exportCreds || false;
		var node = {};
		node.id = n.id;
		node.type = n.type;
		for (var d in n._def.defaults) {
			node[d] = n[d];
		}
		if (exportCreds && n.credentials) {
			node.credentials = {};
			for (var cred in n._def.credentials) {
				if (n._def.credentials.hasOwnProperty(cred)) {
					if (n.credentials[cred] != null) {
						node.credentials[cred] = n.credentials[cred];
					}
				}
			}
		}
		if (n._def.category != "config") {
			node.x = n.x;
			node.y = n.y;
			node.z = n.z;
			node.wires = [];
			for (var i = 0; i < n.outputs; i++) {
				node.wires.push([]);
			}
			var wires = links.filter(function(d) {
				return d.source === n;
			});
			for (var i in wires) {
				var w = wires[i];
				node.wires[w.sourcePort].push(w.target.id);
			}
		}
		return node;
	}
/**
	 * Converts a node to an exportable JSON Object
	 **/
Converts a node to an exportable JSON Object
Converts a node to an exportable JSON Object
function convertNode(n, exportCreds) {
		exportCreds = exportCreds || false;
		var node = {};
		node.id = n.id;
		node.type = n.type;
		for (var d in n._def.defaults) {
			node[d] = n[d];
		}
		if (exportCreds && n.credentials) {
			node.credentials = {};
			for (var cred in n._def.credentials) {
				if (n._def.credentials.hasOwnProperty(cred)) {
					if (n.credentials[cred] != null) {
						node.credentials[cred] = n.credentials[cred];
					}
				}
			}
		}
		if (n._def.category != "config") {
			node.x = n.x;
			node.y = n.y;
			node.z = n.z;
			node.wires = [];
			for (var i = 0; i < n.outputs; i++) {
				node.wires.push([]);
			}
			var wires = links.filter(function(d) {
				return d.source === n;
			});
			for (var i in wires) {
				var w = wires[i];
				node.wires[w.sourcePort].push(w.target.id);
			}
		}
		return node;
	}
function convertNode ( n , exportCreds ) { exportCreds = exportCreds || false ; var node = { } ; node . id = n . id ; node . type = n . type ; for ( var d in n . _def . defaults ) { node [ d ] = n [ d ] ; } if ( exportCreds && n . credentials ) { node . credentials = { } ; for ( var cred in n . _def . credentials ) { if ( n . _def . credentials . hasOwnProperty ( cred ) ) { if ( n . credentials [ cred ] != null ) { node . credentials [ cred ] = n . credentials [ cred ] ; } } } } if ( n . _def . category != "config" ) { node . x = n . x ; node . y = n . y ; node . z = n . z ; node . wires = [ ] ; for ( var i = 0 ; i < n . outputs ; i ++ ) { node . wires . push ( [ ] ) ; } var wires = links . filter ( function ( d ) { return d . source === n ; } ) ; for ( var i in wires ) { var w = wires [ i ] ; node . wires [ w . sourcePort ] . push ( w . target . id ) ; } } return node ; }
Converts a node to an exportable JSON Object
Converts a node to an exportable JSON Object