Skip to content

Repository files navigation

Contributors Forks Stargazers Issues Apache 2.0 License


Logo

Node-red lowercase node in TypeScript

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is the classical lower-case example from the node-red documentation but converted from Javascript to TypeScript.

But why Typescript? Many, many reasons, for instance did you know that the original code contains a bug in that it assumes unconditionally that msg contains a payload member and that it is always a string? By using Typescript the compiler and IDE are able to pick up that and give you an error:

Screenshot with compiler error indicator

and by fixing that not only does the compiler stop complaining "Hey, the type of payload is unknown, you cannot assume it exists or that it is a string", but now it also is able to safely provide suggestions on which methods a string variable has and you might be interested in using:

Screenshot with compiler error indicator

So while having a lower-case capable node is perhaps by it self not that super exciting, the idea is that you should be able to use this project as a template/starting point to develop your awesome Node-RED node, in Typescript.

(back to top)

Built With

  • NODE-red
  • TypeScript
  • Node.js
  • NPM
  • Git

(back to top)

Usage

  1. Fork this repository.
  2. Make whatever modifications you want.
  3. Run tests.
  4. Profit?

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Notice that wip/* branches are work in progress and can be rebased at any time.

(back to top)

License

While the documentation page does not explicitly say, the repository says Apache 2.0. But that covers the lowercase code. When you remove that code to replace it with your own code feel free to change the license of your new project to something else, including LGPL.

(back to top)

Contact

Project Link: https://github.com/hlovdal/hlovdal-node-red-lowercase-in-typescript

(back to top)

About

Node-red node that implements the lowercase example, written in TypeScript

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages