Hyperscript tools for web craftsmen.
- ES6 module.
- Extremely well tested.
- Online
HTMLto hyperscript converter. - Online
HTMLformatter. - Optimized syntax for readability and clarity:
- All
HTMLtags without introducing global variables. Attributesareobjectsand always precedechildren.Styleattribute can bestringorobject.Classattribute can bestringorarray.- Automatic transformation from
camelCasetokebab-caseinattributeandstylekeys. Childrenare alwaysarraysand falsy values are automatically ignored.
- All
- Flexibility taken to the extreme:
The advantages of using hyperscript to produce HTML elements are many:
- No build steps required.
- No special text editor support required.
- No need to learn a new templating language.
- Standard debug and error analysis tools work normally.
- It is possible to use well-tested and defined functions to produce
HTMLelements. - It is possible to combine elements to produce complex applications.
- It can be used to generate
HTMLtext,DOMnode, virtualDOM, both in the browser and on the server. - Can be combined with any framework or library, both in the browser and on the server.
- Frameworks and libraries go in and out of use,
hyperscriptis just a function that will always be supported.
Most hyperscript implementations are made with a specific use in mind,
associated with a framework, library or browser.
The objective of this module is to deliver a hyperscript implementation that
allows a clear and expressive syntax to read, without making any assumptions
about its use.
This way, it is possible to use hyperscript to create views and elements,
without being tied to a technology or page rendering strategy.
It's a very simple project. Any contribution, any feedback is greatly appreciated.
If this project was useful to you, consider giving it a star on github, it's a way to increase evidence and attract more contributors.
This work is hugely influenced by these amazing projects:
A huge thank you to all the people who contributed to these projects.