Knockout punches
Now that you are familiar with the techniques that are used to modify the binding syntax and the general use of preprocessors, we are going to look at the popular Knockout plugin Knockout.Punches (get it?)
. Punches is written by Michael Best, who is a Knockout developer and the creator of the Knockout preprocessor functionality and some of the best real-world use cases for preprocessors. We are going to look at some of them and dig in to see how they work. This section is not going to cover everything in Knockout Punches; if you want to learn more about it, you can check out the documentation online.
Note
The documentation for Knockout.Punches
can be found at http://mbest.github.io/knockout.punches, which includes an API reference and the source code.
Embedded text bindings
Embedded text bindings offer the same syntax that we created with the preprocessor in the Supporting alternate syntaxes section—converting curly braces into virtual text nodes:
<div>Hello {{...