node-red-contrib-password-g.../lib/PasswordGeneratorNodeInit.ts

20 lines
589 B
TypeScript
Raw Normal View History

2021-07-09 03:49:18 +02:00
import * as nodered from "node-red";
import { PasswordGeneratorNodeProperties } from "./PasswordGeneratorNodeDef";
declare const RED: nodered.EditorRED;
const nodeName = "password-generator";
RED.nodes.registerType<PasswordGeneratorNodeProperties>(nodeName, {
category: "function",
color: "#a6bbcf",
defaults: {
name: { value: "" },
size: { value: "", validate: RED.validators.number() },
setTo: { value: "" },
},
inputs: 1,
outputs: 1,
icon: "fas fa-not-equal",
label: function () {
return this.name || nodeName;
},
});