{"library":"node-red-contrib-calc","title":"Node-RED Calculator Node","description":"node-red-contrib-calc is a Node-RED node designed to perform a range of basic mathematical operations directly within Node-RED flows. Currently at version 1.0.6, it primarily receives maintenance updates, with recent releases focusing on expanding available operations like `truncate` and enhancing result formatting. Unlike traditional JavaScript libraries, this package integrates as a graphical node in the Node-RED editor. Its core differentiator lies in providing a simplified, visual interface for common arithmetic, aggregation (min, max, average), and rounding tasks, allowing users to easily inject, process, and output numerical data within their IoT and automation workflows without writing custom functions. It is positioned as a simpler alternative to more advanced statistical packages like `node-red-contrib-statistics`.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install node-red-contrib-calc"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"[\n  {\n    \"id\": \"b6bc5399.8385e\",\n    \"type\": \"calculator\",\n    \"z\": \"4142483e.06fca8\",\n    \"name\": \"\",\n    \"inputMsgField\": \"payload\",\n    \"outputMsgField\": \"payload\",\n    \"operation\": \"max\",\n    \"constant\": \"\",\n    \"round\": false,\n    \"decimals\": 0,\n    \"x\": 640,\n    \"y\": 3060,\n    \"wires\": [\n      [\"4c297cba.7585a4\"]\n    ]\n  },\n  {\n    \"id\": \"e5a3b930.003428\",\n    \"type\": \"inject\",\n    \"z\": \"4142483e.06fca8\",\n    \"name\": \"\",\n    \"topic\": \"\",\n    \"payload\": \"[321,123,333,222,111]\",\n    \"payloadType\": \"json\",\n    \"repeat\": \"\",\n    \"crontab\": \"\",\n    \"once\": false,\n    \"onceDelay\": 0.1,\n    \"showConfirmation\": false,\n    \"confirmationLabel\": \"\",\n    \"x\": 420,\n    \"y\": 3060,\n    \"wires\": [\n      [\"b6bc5399.8385e\"]\n    ]\n  },\n  {\n    \"id\": \"4c297cba.7585a4\",\n    \"type\": \"debug\",\n    \"z\": \"4142483e.06fca8\",\n    \"name\": \"\",\n    \"active\": true,\n    \"tosidebar\": true,\n    \"console\": false,\n    \"tostatus\": false,\n    \"complete\": \"false\",\n    \"x\": 830,\n    \"y\": 3060,\n    \"wires\": []\n  }\n]","lang":"json","description":"This example Node-RED flow demonstrates how to configure the `calc` node to find the maximum value from an array of numbers injected into the flow, and then display the result in the Node-RED debug sidebar.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}