[
  {
    "id": "a000000000000001",
    "type": "tab",
    "label": "純函式運算",
    "disabled": false,
    "info": "函式只處理輸入訊息，不存取網路、檔案或外部系統。",
    "env": []
  },
  {
    "id": "a000000000000002",
    "type": "inject",
    "z": "a000000000000001",
    "name": "手動送出數值",
    "props": [
      {
        "p": "payload"
      },
      {
        "p": "topic",
        "vt": "str"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "topic": "",
    "payload": "6",
    "payloadType": "num",
    "x": 160,
    "y": 100,
    "wires": [
      [
        "a000000000000003"
      ]
    ]
  },
  {
    "id": "a000000000000003",
    "type": "function",
    "z": "a000000000000001",
    "name": "計算數值平方",
    "func": "if (typeof msg.payload !== \"number\" || !Number.isFinite(msg.payload)) {\n    node.error(new Error(\"payload-validation-failed\"), msg);\n    return null;\n}\nconst 數值 = msg.payload;\nmsg.payload = { 原值: 數值, 平方: 數值 * 數值 };\nreturn msg;",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 390,
    "y": 100,
    "wires": [
      [
        "a000000000000004"
      ]
    ]
  },
  {
    "id": "a000000000000004",
    "type": "debug",
    "z": "a000000000000001",
    "name": "檢視運算結果",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 700,
    "y": 100,
    "wires": []
  }
]
