At only 200 lines of code, the library is very light-weight for a client-side library.
Mold compiles plain-text templates to functions that map JavaScript values to strings (the filling in of the template) and provides an interface for directly inserting the result of such functions into documents ('casting' the molds).
Almost all Mold's operators are concerned with plain text, but a few of them are HTML-specific, in that they refer to the nodes created by the template.
In a typical use scenario, the web application somehow gets template strings from the server (it could directly fetch text files, or the strings might be in script files), compiles them once, and then uses the resulting 'molds' to build up parts of the document.
Comments not found