Last active
April 14, 2019 22:09
-
-
Save bernardobelchior/68987e79926286518defed792b99a9be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module.exports = function (RED: Red) { | |
class LowerCaseNode { | |
constructor(config: NodeProperties) { | |
RED.nodes.createNode(this, config); | |
this.on('input', function(msg: any) { | |
msg.payload = msg.payload.toLowerCase(); | |
this.send(msg); | |
}); | |
} | |
} | |
RED.nodes.registerType("lower-case", LowerCaseNode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment