Last active
September 24, 2016 00:02
-
-
Save upkarlidder/0d007d32dc856b7c83f9a58e08d64d7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "b93671f5.98624", | |
"type": "debug", | |
"z": "5d7690ec.49781", | |
"name": "", | |
"active": true, | |
"console": "false", | |
"complete": "payload", | |
"x": 579.5, | |
"y": 236, | |
"wires": [ | |
] | |
}, | |
{ | |
"id": "e9d25ae5.00b248", | |
"type": "inject", | |
"z": "5d7690ec.49781", | |
"name": "", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"repeat": "5", | |
"crontab": "", | |
"once": false, | |
"x": 196.5, | |
"y": 236, | |
"wires": [ | |
[ | |
"f8c01873.0265a8" | |
] | |
] | |
}, | |
{ | |
"id": "f8c01873.0265a8", | |
"type": "function", | |
"z": "5d7690ec.49781", | |
"name": "", | |
"func": "function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nvar num = getRandomIntInclusive(1, 10);\nif(num < 5){\n msg.payload = \"Number \" + num + \" is a low number\"; \n} else {\n msg.payload = \"Number \" + num + \" is a high number\"; \n}\n\nreturn msg", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 381.5, | |
"y": 236, | |
"wires": [ | |
[ | |
"b93671f5.98624" | |
] | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment