A Simple Client-Side Templating Language

In a recent project, I wanted a simple way to bind some JSON data to a DOM element without importing any libraries and I think I came up with a pretty neat solution (in my eyes) that fit all my needs for the project.
The solution encodes templating instructions inside DOM data attributes named data-bind-*, which are accessible on the DOM element in the dataset property and it just so happens to camel-case the attributes automatically (i.e., to set innerText you would have an attribute data-bind_inner-text – note the hyphen).

Link: https://dzone.com/articles/a-simple-client-side-templating-language?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev